#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  int count[2] = {0, 0}, cnt;
  cin >> n;
  string s;
  cin >> s;
  char c = 'r';
  cnt = n;
  for (int i = 0; i < 2; i++) {
    count[0] = 0;
    count[1] = 0;
    for (int j = 0; j < s.length(); j++) {
      if (s[j] != c) {
        if (c == 'r')
          count[0]++;
        else
          count[1]++;
      }
      c = c == 'r' ? 'b' : 'r';
    }
    if (cnt > max(count[0], count[1])) cnt = max(count[0], count[1]);
    c = 'b';
  }
  cout << cnt << endl;
  return 0;
}
