adding a solution to Project Euler problem 2