#include <bits/stdc++.h>
using namespace std;
string s;
long long ans, cur, sign = 1;
signed main() {
  cin >> s;
  s += "+";
  for (char c : s) {
    if (c == '+' || c == '-') ans += sign * cur, cur = 0;
    if (c == '-') sign = -1;
    if (c == '+') sign = +1;
    cur = cur * 10 + c - '0';
  }
  cout << ans << endl;
}
