#include <bits/stdc++.h>
int main() {
  int n, i, j;
  int top = 1;
  char d = 'r';
  scanf("%d", &n);
  char a[n + 1];
  scanf("%s", a);
  int p = 0, q = 0, r = 0, s = 0;
  int t, u;
  for (i = 0; i < n; i++) {
    if (i % 2 == 0) {
      if (a[i] == d)
        p++;
      else
        q++;
    } else {
      if (a[i] == d)
        r++;
      else
        s++;
    }
  }
  if (s >= p)
    t = s;
  else
    t = p;
  if (q >= r)
    u = q;
  else
    u = r;
  if (t <= u)
    printf("%d", t);
  else
    printf("%d", u);
  return 0;
}
