Project Euler problem2.js