#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6;
string str;
void solve() {
  for (int i = 0; i < str.length(); i++) {
    if (str[i] == '.') {
      cout << 0;
      continue;
    }
    if (str[i] == '-' && (i + 1) < str.length()) {
      if (str[i + 1] == '-')
        cout << 2;
      else if (str[i + 1] == '.')
        cout << 1;
      i++;
    }
  }
}
int main() {
  cin >> str;
  solve();
  return 0;
}
