project euler problem 16; python