If you have firmware version 5.0x or above, you can do math operations with more than two operators. If you are using firmware less than 5.0x, the math is has to be done with only two operators.
In either case, it may be easier to use another variable. Something like the following would work with any firmware revision.
'solve the value for c with IF/ENDIF statements