-- yukicoder My Practice -- author: Leonardone @ NEETSDKASU main = print . solve =<< getLine where solve xs = f xs (\x -> x) f xs g = case ys of [] -> v (z:zs) | z == '+' -> f zs (* v) | z == '*' -> f zs (+ v) where p c = elem c "*+" (n, ys) = break p xs v = g $ read n