#include <bits/stdc++.h>
using namespace std;
int main() {
  char in;
  string broze = "";
  while (cin >> in) {
    broze += in;
    if (broze == ".") {
      cout << 0;
      broze = "";
    } else if (broze == "-.") {
      cout << 1;
      broze = "";
    } else if (broze == "--") {
      cout << 2;
      broze = "";
    }
  }
  return 0;
}
