while~0:m="mysterious";a=input().split(" + ");print(m*(m in a)or sum(eval(e,{m:0})for e in a))