Modification 2: Euler Project Problem 4