Solve Euler 004