Example 2: There are $n$ marbles. Arbitrarily divide them into two piles, find the product of the number of marbles in the two piles, then arbitrarily divide one of the piles into two piles, find the product of the number of marbles in these two piles, and so on. Each time, arbitrarily divide one of the piles into two piles, find the product of the number of marbles in these two piles, until no more division is possible. Let the sum of all products be $S$, find the possible values of $S$.