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