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