#include <bits/stdc++.h>
using namespace std;
int n, i, j, sum1, sum2, l, flag, maxn, c, q, p;
int b[2];
char d;
char a[100010];
int main() {
  while (cin >> n) {
    memset(b, 0, sizeof(b));
    sum1 = sum2 = 0;
    memset(a, q, sizeof(a));
    for (i = 1; i <= n; i++) {
      cin >> a[i];
      if (a[i] == 'b') {
        sum1++;
      } else if (a[i] == 'r') {
        sum2++;
      }
    }
    flag = n % 2;
    l = n / 2 + flag;
    if (sum1 >= sum2) {
      maxn = sum1;
      d = 'b';
    } else {
      maxn = sum2;
      d = 'r';
    }
    c = maxn - l;
    q = p = 0;
    for (j = 0; j < l; j++) {
      if (a[j * 2 + 1] != d) {
        q++;
      }
      if (a[j * 2 + 2] != d) {
        p++;
      }
    }
    if (q > p) {
      q = p;
    }
    cout << q + c << endl;
  }
  return 0;
}
