prob 13: return solution as int
prob 13: added input