Projece Euler 1 solution