#include <bits/stdc++.h>
using namespace std;

int main() {
  int n;
  string s, count = 0;
  cin >> n >> s;
  char white = '.', black = '#';

  if (s.at(0) == black) {
    for (int i = 1; i < s.size(); i++) if (s.at(i) == white) count++;
  } else {
    for (int i = 1; i < s.size(); i++) if (s.at(i-1) == black) count++;
  }
  cout << count << endl;
}