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