Modification 1: Euler Project Problem 4