#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  string s;
  cin >> n;
  cin >> s;
  int sum_even = 0;
  int sum_odd = 0;
  for (int i = 0; i < n; i++) {
    string k(1, s[i]);
    if (i % 2 == 0) {
      if (k == ".") {
        sum_even += 1;
      } else {
        sum_odd += 1;
      }
    } else {
      if (k == "#") {
        sum_odd += 1;
      } else {
        sum_even += 1;
      }
    }
  }
  if (sum_even > sum_odd) {
    cout << sum_odd << endl;
  } else {
    cout << sum_even << endl;
  }
  return 0;
}
