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