it looks like there are packages that perform simple math; see http://tex.stackexchange.com/questions/87824/how-to-do-simple-calculation-in-latex. I decided against including it in this version though.