#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, count = 0;
  string s;
  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;
}
