#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
char s[100005];
int main() {
  int i, n, cnt1, cnt2, ans1, ans2;
  cnt1 = cnt2 = ans1 = ans2 = 0;
  scanf("%d%s", &n, s);
  for (i = 0; i < n; i++) {
    if (i & 1) {
      if (s[i] == 'r') cnt1++;
    } else {
      if (s[i] == 'b') cnt2++;
    }
  }
  ans1 = max(cnt1, cnt2);
  cnt1 = cnt2 = 0;
  for (i = 0; i < n; i++) {
    if (i & 1) {
      if (s[i] == 'b') cnt1++;
    } else {
      if (s[i] == 'r') cnt2++;
    }
  }
  ans2 = max(cnt1, cnt2);
  printf("%d", min(ans1, ans2));
}
