#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, c1, c2, er = 0, eb = 0, r = 0, b = 0;
  string s;
  cin >> n;
  cin >> s;
  for (int i = 0; i < s.size(); i++) {
    if (i % 2 == 0) {
      if (s[i] == 'r') er++;
      if (s[i] == 'b') eb++;
    } else {
      if (s[i] == 'r') r++;
      if (s[i] == 'b') b++;
    }
  }
  c1 = max(er, b);
  c2 = max(eb, r);
  cout << min(c1, c2);
}
