#include <bits/stdc++.h>
template <typename T>
bool uax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <typename T>
bool uin(T& a, T b) {
  if (b < a) {
    a = b;
    return true;
  }
  return false;
}
using namespace std;
constexpr int power(int x, int n) { return n > 0 ? power(x, n - 1) * x : 1; }
void solve_a() {
  int x;
  cin >> x;
  cout << (x & 1) << endl;
}
void solve_d() { cout << "even" << endl; }
void solve_b() {
  int t = 0;
  vector<int> perm(10);
  for (int i = (int)(0); i < (int)(10); ++i) perm[i] = i;
  srand(237123);
  random_shuffle((perm).begin(), (perm).end());
  int cno = 0;
  for (int i = (int)(0); i < (int)(10); ++i) {
    cout << perm[i] << endl << flush;
    string s;
    if (!(getline(cin, s))) break;
    for (char& c : s) c = tolower(c);
    if (s == "no") cno += 1;
    if (cno > 3) t += 1;
    if (s == "terrible" || s == "worse" || s == "no way" || s == "don't even" ||
        s == "are you serious?" || s == "go die in a hole")
      t -= 1;
    else if (s == "not bad" || s == "cool" || s == "great!" ||
             s == "don't think so" || s == "don't touch me!")
      t += 1;
    if (t != 0) break;
  }
  assert(t != 0);
  if (t > 0)
    cout << "normal";
  else
    cout << "grumpy";
  cout << endl << flush;
}
void solve_c() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = (int)(0); i < (int)(n); ++i) cin >> a[i];
  while (n > 1) {
    for (int i = (int)(0); i < (int)(n - 1); ++i)
      if (abs(a[i] - a[i + 1]) > 1) {
        cout << "NO" << endl;
        return;
      }
    a.erase(max_element((a).begin(), (a).end()));
    n -= 1;
  }
  cout << "YES" << endl;
}
void solve_g() {
  string s;
  getline(cin, s);
  int n = s.length();
  int m = 600;
  vector<string> a(5 * n, string(m, '.'));
  int z = 0;
  for (int i = (int)(0); i < (int)(n); ++i) {
    int x = (int)(s[i]);
    x &= 255;
    a[i * 5 + 1][0] = 'X';
    int j = 1;
    while (x != z) {
      if (i == 0) {
        z = (z + 1) % 256;
      } else {
        z = (z + 255) % 256;
      }
      a[i * 5 + 0][j] = 'X';
      a[i * 5 + 1][j] = 'X';
      ++j;
      a[i * 5 + 1][j] = 'X';
      ++j;
    }
    assert(j < m);
    a[i * 5 + 1][j] = 'X';
    a[i * 5 + 3][0] = 'X';
    a[i * 5 + 3][m - 1] = 'X';
    a[i * 5 + 4][0] = 'X';
  }
  for (int i = (int)(0); i < (int)(a.size()); ++i) cout << a[i] << endl;
}
void solve_f() {
  string s;
  cin >> s;
  long long r = 0;
  long long x = 1, t = 0;
  for (char c : s) {
    if (c == '+') {
      r += x * t;
      x = 1;
      t = 0;
    } else if (c == '-') {
      r += x * t;
      x = -1;
      t = 0;
    }
    { t = 10 * t + c - '0'; }
  }
  r += x * t;
  cout << r << endl;
}
int main() {
  solve_f();
  return 0;
}
