Adding up to problem 31