#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, t1, t2, cnt, ans, sum;
  char s[100010];
  while (~scanf("%d", &n)) {
    scanf("%s", s);
    t1 = t2 = 0;
    for (int i = 0; i < n; i++) {
      if (i % 2 == 0) {
        if (s[i] != 'b') t1++;
      } else {
        if (s[i] != 'r') t2++;
      }
    }
    ans = max(t1, t2);
    t1 = t2 = 0;
    for (int i = 0; i < n; i++) {
      if (i % 2) {
        if (s[i] != 'b') t1++;
      } else {
        if (s[i] != 'r') t2++;
      }
    }
    cnt = max(t1, t2);
    sum = min(cnt, ans);
    printf("%d\n", sum);
  }
  return 0;
}
