#include <bits/stdc++.h>
using namespace std;
int main()
{
int n;
string s;
cin >> n >> s;
for (int i = 0; i < n; i++)
{
if (s[i] == '*')
cout << "*";
else
{
int res = 0;
if (i > 0 && s[i - 1] == '*')
res++;
if (i + 1 < n && s[i + 1] == '*')
res++;
cout << res;
}
}
cout << "\n";
return 0;
}