#include <bits/stdc++.h>
using namespace std;
int main() {
  int xr, xb, yr, yb;
  xr = xb = yr = yb = 0;
  int n;
  char s[1000005];
  scanf("%d", &n);
  scanf("%s", s + 1);
  for (int i = 1; i <= n; i++) {
    if (i % 2) {
      if (s[i] == 'r')
        xr++;
      else
        xb++;
    } else {
      if (s[i] == 'r')
        yr++;
      else
        yb++;
    }
  }
  printf("%d", min(max(xr, yb), max(xb, yr)));
  return 0;
}
