#include <bits/stdc++.h>
using namespace std;
int main() {
  string x;
  map<char, int> visit1, visit2;
  int a = 0, b = 0, n, c, ans = 0;
  scanf("%d", &n);
  cin >> x;
  for (int i = 0; i < x.length(); i++) {
    if (i % 2 == 0) {
      if (x[i] == 'b') {
        a++;
        visit1[x[i]]++;
      } else {
        b++;
        visit2[x[i]]++;
      }
    } else {
      if (x[i] == 'r') {
        a++;
        visit1[x[i]]++;
      } else {
        b++;
        visit2[x[i]]++;
      }
    }
  }
  if (!min(a, b))
    printf("0");
  else {
    if (a <= b) {
      ans += min(visit1['r'], visit1['b']);
      ans += abs(visit1['r'] - visit1['b']);
    } else {
      ans += min(visit2['r'], visit2['b']);
      ans += abs(visit2['r'] - visit2['b']);
    }
    printf("%d", ans);
  }
}
