#include <bits/stdc++.h>
int gcd(int a, int b);
int main(void) {
  int i;
  int ans = 0;
  for (i = 0; i < 4; i++) {
    char str;
    scanf("%c", &str);
    if (str == '+')
      ans++;
    else
      str--;
  }
  printf("%d", ans);
  return 0;
}
int gcd(int a, int b) {
  int max, min, tmp;
  max = ((a > b) ? (a) : (b));
  min = ((a < b) ? (a) : (b));
  if (max % min == 0)
    return min;
  else {
    tmp = min;
    min = max % min;
    max = tmp;
    return gcd(max, min);
  }
}
