actually it wouldn't be that difficult to obfuscate the answer.
Just remember a couple of basic mathematics rules namely
multiply is the inverse of divide
addition is the inverse of subtraction
1 is the miltiplicative identity
0 is the addative identiy
1/x is the recipricol of x
with those five simple rules you can do all kinds of goofy stuff with the dice that is next to impossible to follow, but evaluates to zero.
Then you do this ultra goofy math (a different function) for each die and at the end you've got obfuscated mathematics.
I knew that calc II was good for something.
nMOD2 * (n-1)