#include <bits/stdc++.h>
using namespace std;
int main() {
  int n = 0;
  string s = "";
  cin >> n >> s;
  int count = 0;
  for (int i = 0; i < n; i++) {
    if (i % 2 == 0) {
      if (s[i] == '.') count++;
    } else {
      if (s[i] == '#') count++;
    }
  }
  cout << min(count, n - count);
}
