Yup, you can do the math operations using the script command 'set variable'.
Set in variable ~ the value ~ or number value ~.
In the field 'number value' you can place any expression containing variables and traditional math operators (though I don't think modulo will work). Cheers