#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int count = 0;
  string s;
  cin >> s;
  for (int i = 0; i < 4; i++) {
    if (s.at(i) == '+') {
      count++;
    }
  }
  cout << 2 * count - 4
}