Fix project euler problem 1.