#include <bits/stdc++.h>
const int N = 1e3 + 5;
char ch[N];
int main() {
  scanf("%s", ch + 1);
  int len = strlen(ch + 1), ans = 0, x = 0, pre = 1;
  for (int i = 1; i <= len; i++) {
    if (ch[i] >= '0' && ch[i] <= '9')
      x = (x << 3) + (x << 1) + ch[i] - 48;
    else {
      if (pre == 1) ans += x;
      if (pre == 2) ans -= x;
      if (ch[i] == '+')
        pre = 1;
      else if (ch[i] == '-')
        pre = 2;
      x = ch[i] - 48;
    }
  }
  if (pre == 1)
    ans += x;
  else if (pre == 2)
    ans -= x;
  printf("%d", ans);
  return 0;
}
