Problem 1 from ProjectEuler