Problem 1 of Project Euler