Project Eurler Problem 25