Correctly set the denominations in problem 31.