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