#include <bits/stdc++.h>
using namespace std;
int main() {
  char t;
  int n;
  cin >> n;
  int ans = 0;
  char head;
  for (int i = 0; i < n; ++i) {
    cin >> t;
    if (i > 0) {
      if (head == '#') {
        ans++;
        t = '#';
      }
    }
    head = t;
  }
  cout << ans;
  return 0;
}
