#include <bits/stdc++.h>
using namespace std;
int main() {
  long c = 0, d = 0, e = 0;
  string s;
  cin >> s;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '-') {
      c++;
    }
    if (s[i] == '+') {
      d++;
    }
  }
  if (c == d) {
    cout << 0 << endl;
  } else if (c > d) {
    printf("-%ld", c - d);
  } else {
    printf("-%ld", d - c);
  }
  return 0;
}
