Solve Euler 017.