#include <bits/stdc++.h>
using namespace std;
const int maxn = 100000 + 5, inf = 1e9;
char str[maxn];
int n, s[maxn], f[maxn][2];
int main() {
  int i, cnt1 = 0, cnt2 = 0, wrong1 = 0, wrong2 = 0, wrong3 = 0, wrong4 = 0;
  scanf("%d", &n);
  int m = (n + 1) >> 1;
  scanf("%s", str + 1);
  for (i = 1; i <= n; i++) {
    if (str[i] == 'r')
      cnt1++;
    else
      cnt2++;
    if (str[i] == 'r' && (i & 1)) wrong3++;
    if (str[i] == 'r' && !(i & 1)) wrong1++;
    if (str[i] == 'b' && (i & 1)) wrong2++;
    if (str[i] == 'b' && !(i & 1)) wrong4++;
  }
  int ans1 = min(wrong1, wrong2) + abs(wrong1 - wrong2);
  int ans2 = min(wrong3, wrong4) + abs(wrong3 - wrong4);
  cout << min(ans1, ans2) << endl;
  return 0;
}
