import strutils let S = stdin.readLine var a: int b: string pre: char flg: bool proc calc(s: char) = if flg: if pre == '*': a += b.parseInt else: a *= b.parseInt else: a = b.parseInt pre = s flg = true b = "" for s in S & ' ': if s.isDigit: b.safeAdd s else: s.calc echo a