#include <bits/stdc++.h>
using namespace std;
string s, ans;
int p;
int main() {
  cin >> s;
  while (p < s.length()) {
    if (s[p] == '.')
      ans.push_back('0'), ++p;
    else if (s[p + 1] == '.')
      ans.push_back('1'), p += 2;
    else
      ans.push_back('2'), p += 2;
  }
  cout << ans;
}
