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