#include <bits/stdc++.h>
using namespace std;
int main() {
  string zero = ".";
  string one = "-.";
  string two = "--";
  string code;
  cin >> code;
  string ans;
  for (int i = 0; i < code.length(); i++) {
    if (code[i] == '.') {
      ans += "0";
      continue;
    }
    if (code[i] == '-') {
      if (i + 1 < code.length()) {
        if (code[i + 1] == '.') {
          ans += "1";
          i++;
          continue;
        }
        if (code[i + 1] == '-') {
          ans += "2";
          i++;
          continue;
        }
      }
    }
  }
  cout << ans;
}
