Project Euler problem 65