import sys
try:
    import os
    f = open('input.txt', 'r')
    sys.stdin = f
except FileNotFoundError:
    None
from math import sqrt, ceil
input=lambda: sys.stdin.readline().strip()

def expr():
    global now
    x = term()
    ans=x
    while now<n and s[now] in "+-":
        op = s[now]
        now+=1
        y = term()
        if op=="+":
            ans+=y
        else:
            ans-=y
    return ans

def term():
    global now
    if s[now].isdecimal():
        x = int(s[now])
        now+=1
        return x
    else:
        now+=1
        x= expr()
        now+=1
        return x


s=input()
n=len(s)
now=0
print(expr())