#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int sign = 1, tmp = 0, ans = 0;
  for (int i = 0; i < s.size(); i++) {
    if (!(s[i] >= '0' && s[i] <= '9')) {
      ans += tmp * sign;
      if (s[i] == '-')
        sign = -1;
      else
        sign = 1;
      tmp = 0;
    }
    tmp = (s[i] - '0') + tmp * 10;
  }
  ans += tmp * sign;
  cout << ans << endl;
  return 0;
}
