#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  string s;
  cin >> n >> s;
  int cntb1 = 0, cntr1 = 0;
  for (int i = 0; i < n; i++)
    if (!(i % 2) && s[i] != 'b')
      cntb1++;
    else if (i % 2 && s[i] != 'r')
      cntr1++;
  cntb1 = max(cntb1, cntr1);
  int cntb2 = 0, cntr2 = 0;
  for (int i = 0; i < n; i++)
    if (i % 2 && s[i] != 'b')
      cntb2++;
    else if (!(i % 2) && s[i] != 'r')
      cntr2++;
  cntb2 = max(cntb2, cntr2);
  cout << min(cntb1, cntb2);
  return 0;
}
