#include <bits/stdc++.h>
int main(int argc, char const* argv[]) {
  using namespace std;
  int n;
  cin >> n;
  char* s = new char[n];
  cin >> s;
  int num = 0;
  for (int i = 0; i < n - 1; ++i) {
    if (s[i + 1] == '.') {
      if (s[i] == '#') {
        ++num;
      }
      ++i;
    }
  }
  cout << num << endl;
  return 0;
}
