#include <bits/stdc++.h>
using namespace std;
void swap(int &a, int &b) {
  int t;
  t = a;
  a = b;
  b = t;
}
int max(int a, int b) {
  if (a > b)
    return a;
  else
    return b;
}
int min(int a, int b) {
  if (a < b)
    return a;
  else
    return b;
}
char a[100002];
int main() {
  int n;
  scanf("%d\n", &n);
  scanf("%s\n", a);
  int r1 = 0, b1 = 0, r2 = 0, b2 = 0;
  for (int i = 0; i < n; i++) {
    if (i % 2 == 0) {
      if (a[i] == 'r')
        r2++;
      else
        b1++;
    } else {
      if (a[i] == 'r')
        r1++;
      else
        b2++;
    }
  }
  int ans1 = max(b1, r1);
  int ans2 = max(b2, r2);
  int ans = min(ans1, ans2);
  printf("%d\n", ans);
  return 0;
}
