import sys sys.setrecursionlimit(10**7) S = input() begin = 0 def expr(): global begin ret = 0 op = "" while begin