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