Solve Euler 003