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