#include <bits/stdc++.h>
using namespace std;
int n, m, a[1000100];
int main() {
  int r, k, i, c = 0, x = 0, y = 0, j, t, l, z, x1 = 0, y1 = 0;
  long long ans = 0;
  string p;
  scanf("%d", &n);
  cin >> p;
  for (i = 0; i < n; i++) {
    if (i % 2 == 0) {
      if (p[i] != 'r')
        x++;
      else
        x1++;
    } else {
      if (p[i] != 'b')
        y++;
      else
        y1++;
    }
  }
  cout << min(max(x, y), max(x1, y1)) << endl;
  return 0;
}
