#include <bits/stdc++.h>
using namespace std;
 
int main() {
int N;string S;int count;int kuro;int siro;
  cin>>N; cin >>S;
  count=0;kuro=0;
  
   for (int i = 0; i < N; i++) {  
   if(S.at(i)=='#'){break;}
     else{cout<<0<<endl;}
   }
  
  int j;
  j=i;
   while( j < N) {
     if(S.at(j)=='#'){kuro=kuro+1;
                      j++;}
   }
  
  siro=N-(i+kuro);
  
   if(kuro<siro){
     cout<<kuro<<endl;
     }else{
     cout<<siro<<endl;}
}
  