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