#include <bits/stdc++.h>
using namespace std;
const int maxn = 1005;
int f = 1;
int ans = 0;
char s[maxn];
int main() {
  scanf("%s", s);
  int t = 0;
  for (int i = 0; i < (int)strlen(s); i++) {
    if (!isdigit(s[i])) {
      ans += f * t;
      t = 0;
      f = s[i] == '+' ? 1 : -1;
    }
    t = t * 10 + s[i] - '0';
  }
  ans += f * t;
  printf("%d\n", ans);
  return 0;
}
