Add solution to Euler problem 4