You'll have to just chain several such rules together. For example, to total S1, S2, S3 and S4, you might do something like:
SubTotal = S1 + S2
SubTotal = SubTotal + S3
SubTotal = SubTotal + S4
This simplified approach gets rid of any issues related to order of precedence for operators or the use of parentheses in typical programming.