Solve euler problem 45