Project Euler problem 2