When $n$ standard 6-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$?

Let's think step by step and output the final answer within \boxed{}.
user