#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int n;
  string s;
  cin >> n;
  cin >> s;
  char before = '.';
  int count = 0;
  for (int i = 0; i < n; i++) {
    if (before == '#' && s[i] == '.')
      count++;
    else
      before = s[i];
  }
  cout << count << endl;
}
