Solve Euler Problem 013.