Added a solution for Euler problem 3