#include <bits/stdc++.h>
int main(void) {
  char s[5];
  int ans = 0;
  scanf("%c", &s);
  for (int i = 0; i < 4; i++) {
    ans += s[i] - 43;
  }
  ans = 4 - (ans / 2);
  printf("%d\n", ans);
  return 0;
}
