#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
const int MAXLEN = 1000;
char s[MAXLEN + 1];
int slen;
void run() {
  scanf("%s", s);
  slen = strlen(s);
  int ret = 0, cur = 0, sign = +1;
  for (int i = (0); i < (slen); ++i) {
    if (!isdigit(s[i]))
      ret = ret + sign * cur, cur = 0, sign = s[i] == '+' ? +1 : -1;
    cur = 10 * cur + s[i] - '0';
  }
  ret = ret + sign * cur;
  printf("%d\n", ret);
}
int main() {
  run();
  return 0;
}
