#include <bits/stdc++.h>
using namespace std;
int main() {
  int i = 0, flag = 0, k = 0;
  string s;
  cin >> s;
  int a[s.length()];
  for (int i = 0; i < s.length(); i++) {
    if (s[i] == '.') flag--;
    if (s[i] == '-') flag++;
    if (flag == -1) {
      a[k] = 0;
      flag = 0;
      k++;
      continue;
    }
    if (flag == 0) {
      a[k] = 1;
      flag = 0;
      k++;
      continue;
    }
    if (flag == 2) {
      a[k] = 2;
      flag = 0;
      k++;
      continue;
    }
  }
  for (int i = 0; i < k; i++) cout << a[i];
  return 0;
}
