enhance Prject Euler problem 17 to work for numbers up to 9999