Project Euler Problem 27