Project Euler Problem 401