Math expression is not correct conceptualy, but program mechanics work