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