Problem 3 of project Euler Solution.