Complete problem 1 of Project Euler