#include <bits/stdc++.h>
using namespace std;
const int maxn = 110;
string s;
int main() {
  int n;
  while (scanf("%d", &n) != EOF) {
    cin >> s;
    int sum = 0;
    for (int i = 0; i < n; i++) {
      if (s[i] == '#') {
        if (s[i + 1] == '.') {
          if (s[i - 1] == '.') {
            s[i] = '.', sum++;
          }
        }
      }
    }
    cout << sum << endl;
  }
}
