#include <bits/stdc++.h>
using namespace std;
char a[100010];
int n, Ans, id, Last, Now, Nxt;
int read() {
  int s = 0, w = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') w = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9')
    s = (s << 1) + (s << 3) + ch - '0', ch = getchar();
  return s * w;
}
int main() {
  scanf("%s", a + 1);
  n = strlen(a + 1);
  for (int i = 1; i <= n; i++)
    if (a[i] == '+' || a[i] == '-') {
      id = i;
      break;
    }
  for (int i = 1; i < id; i++) Ans *= 10, Ans += a[i] - '0';
  Last = id;
  Now = '+' - '0';
  Nxt = '-' - '0';
  for (int i = id; i <= n; i++) {
    if (a[Last] == '+') {
      if (a[i] == '+' || a[i] == '-') {
        if (i == Last) continue;
        Last = i, Ans += Now, Now = '+' - '0';
      } else
        Now *= 10, Now += a[i] - '0';
      if (i == n) Ans += Now;
    } else {
      if (a[i] == '+' || a[i] == '-') {
        if (i == Last) continue;
        Last = i, Ans -= Nxt, Nxt = '-' - '0';
      } else
        Nxt *= 10, Nxt += a[i] - '0';
      if (i == n) Ans -= Nxt;
    }
  }
  printf("%d\n", Ans);
  return 0;
}
