#include <bits/stdc++.h>
using namespace std;
const int maxn = 100000 + 10;
const double eps = 1e-10;
const int inf = 0x3f3f3f3f;
const double pi = acos(-1.0);
char s[maxn];
int main() {
  int n;
  scanf("%d", &n);
  scanf("%s", s + 1);
  int ans = inf;
  int sumr2 = 0;
  int sumb1 = 0;
  for (int i = 1; i <= n; ++i) {
    if (s[i] == 'r' && !(i & 1)) sumr2++;
    if (s[i] == 'b' && (i & 1)) sumb1++;
  }
  ans = min(ans, min(sumr2, sumb1) + max(sumr2, sumb1) - min(sumr2, sumb1));
  int sumb2 = 0, sumr1 = 0;
  for (int i = 1; i <= n; ++i) {
    if (s[i] == 'r' && (i & 1)) sumr1++;
    if (s[i] == 'b' && !(i & 1)) sumb2++;
  }
  ans = min(ans, max(sumr1, sumb2));
  printf("%d\n", ans);
  return 0;
}
