Solve Euler 005