(AHSME 1994) When $n$ standard six-sided dice are rolled, the probability of obtaining a sum of 1994 is greater than zero and is the same as the probability of obtaining a sum of $S$. What is the smallest possible value of $S$?
(I've been trying to use generating function, but without success. I took this one from The Art and Craft of Problem Solving - Paul Zeitz, second ed, pag. 8, chapter 1 exercise 1.3.6.)