Your variable type is set to open, which might be the cause of the problem if it's not being saved.
If you wanted to double check things, in this case I would break the two things you are doing into separate steps. To test the script, take the math portion inside SSI Script tags and toss it into the header of the following page and make sure that part of it is working. To test the HTML, make it a normal variable where you saving a hard-coded value and make sure it gets saved to the respondent data record. If both parts work independently, they should work together.