Project Euler problem 2 issue solved