Project Euler, Problem 17, Java, wrong answer