#include <bits/stdc++.h>
using namespace std;
int main() {
  string str;
  cin >> str;
  int t = 0;
  while (str[t]) {
    if (str[t] == '.') {
      cout << 0;
      t++;
    } else if (str[t] == '-' && str[t + 1] == '.') {
      cout << 1;
      t += 2;
    } else if (str[t] == '-' && str[t + 1] == '-') {
      cout << 2;
      t += 2;
    }
  }
  cout << endl;
  return 0;
}
