A, B = input().split() S = '0' + A + B + '+' # print(S) ans = 0; temp = 0 pos = True for c in S: if c in ['+', '-']: if pos: ans += temp else: ans -= temp temp = 0 pos = c == '+' else: temp = 10 * temp + int(c) print(ans)