#include <bits/stdc++.h>
using namespace std;
int n;
int h1(int s[100002], int c[100002]) {
  int x = 0, y = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] != c[i] && s[i] == 'r') {
      x++;
    } else if (s[i] != c[i] && s[i] == 'b') {
      y++;
    }
  }
  int a = min(x, y);
  int b = max(x, y) - a;
  return a + b;
}
int main() {
  int i;
  int s[100002];
  int a[100002];
  int b[100002];
  scanf("%d", &n);
  getchar();
  for (i = 0; i < n; i++) {
    scanf("%c", &s[i]);
    if (i & 1) {
      a[i] = 'b';
      b[i] = 'r';
    } else {
      a[i] = 'r';
      b[i] = 'b';
    }
  }
  int x, y;
  x = h1(s, a);
  y = h1(s, b);
  printf("%d\n", min(x, y));
}
