main::IO() main = do xs <-getLine let ev f st = f * (read . reverse $st) exe _ (f,st)[] = [ev f st] exe ff (f,st)(x:xs) | x `elem` ['0'..'9'] = exe True (f,x:st) xs | ff = ev f st : exe False ((-1)*sgn x,[]) xs | otherwise = exe False ( f *sgn x,[]) xs where sgn c = if c=='+' then 1 else (-1) print . sum $ exe False (1,[]) xs