Project Euler Problem 52