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