#include <bits/stdc++.h>
using namespace std;
int n, m, k;
int a[500];
string s;
int main() {
  cin >> s;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '.')
      a[n++] = 0;
    else {
      i++;
      if (s[i] == '.')
        a[n++] = 1;
      else
        a[n++] = 2;
    }
  }
  for (int i = 0; i < n; i++) printf("%d", a[i]);
  printf("\n");
}
