Project Euler 039