There are distinct piles of stones, each of size . Starting with an initial score of , the following procedure is repeated:
Choose any two piles and remove exactly stones in total from the two piles.
If the number of stones removed from the two piles were and , add to the score.
If all piles are eventually emptied, the current score is confirmed as final. However, if one gets "stuck" and cannot empty all piles, the current score is discarded, resulting in a final score of .
Three example sequences of turns are illustrated below for , with each tuple representing pile sizes as one proceeds, and with additions to the score indicated above the arrows.
Define to be the sum of the final scores achieved for every sequence of turns which successfully empty all piles.