#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  int count = 0;
  cin >> s;
  while (count < s.size()) {
    if (s[count] == '.') {
      cout << "0";
    } else {
      if (s[count + 1] == '.') {
        cout << "1";
        count++;
      } else {
        cout << "2";
        count++;
      }
    }
    count++;
  }
  return 0;
}
