Problem: One very experienced problem writer decided to prepare a problem for April Fools Day contest. The task was very simple - given an arithmetic expression, return the result of evaluating this expression. However, looks like there is a bug in the reference solution...

Input

The only line of input data contains the arithmetic expression. The expression will contain between 2 and 10 operands, separated with arithmetic signs plus and/or minus. Each operand will be an integer between 0 and 255, inclusive.

Output

Reproduce the output of the reference solution, including the bug.

Examples

Input

8-7+6-5+4-3+2-1-0


Output

4


Input

2+2


Output

-46


Input

112-37


Output

375

Solution (in CPP):

Solution:
#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;
}