#include <bits/stdc++.h>
using namespace std;
int main() {
  string text;
  cin >> text;
  string answer = "";
  int i = 0;
  int end = text.length();
  while (1) {
    if (text[i] == '.') {
      answer += '0';
      i++;
      if (i == end) break;
    }
    if (text[i] == '-' && text[i + 1] == '.') {
      answer += '1';
      i += 2;
    }
    if (text[i] == '-' && text[i + 1] == '-') {
      answer += '2';
      i += 2;
    }
    if (i == end) break;
  }
  cout << answer << endl;
  return 0;
}
