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