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