Euler Project Problem 1