Add orderly shutdown to exercise 6.6 (Producer-Consumer). When the program terminates, print the number of nuts eaten by each monkey.