#include <bits/stdc++.h>
using namespace std;
int main() {
  int a;
  cin >> a;
  char b;
  char now;
  int num = 0;
  int youso;
  while (cin >> b) {
    if (num == 0) {
      now = b;
      youso++;
    } else {
      if (now == b) {
      } else {
        youso++;
        now = b;
      }
    }
    num++;
  }
  if (now == '#') {
    youso--;
  }
  int ans = youso / 2;
  cout << ans << endl;
}
