#include <bits/stdc++.h>
int getLen(char *str) {
  int len;
  for (len = 0; *str != '\0'; str++, len++)
    ;
  return len;
}
int main(void) {
  char c;
  bool inMinus = false;
  while ((c = getchar()) != '\n') {
    if (inMinus) {
      if (c == '.')
        putchar('1');
      else
        putchar('2');
      inMinus = false;
    } else if (c == '.')
      putchar('0');
    else
      inMinus = true;
  }
  std::cout << std::endl;
  return 0;
}
