#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int n;
  string s;
  cin >> n >> s ;
int i;
int counter=0;
int flag=0;
for (i=0;i<n;i++)
  if (flag ==0)
    { if (s[i]=="#")flag =1;}
  else 
    {if (s[i] == "*")counter++;}

 cout<<counter<<endl;
}