#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string a;
  cin >> a;
  int count1 = 0, count2 = 0, count3 = 0, count4 = 0;
  for (int i = 0; i < a.length(); i++) {
    if (a[i] == 'r' && i % 2 == 0) count1++;
    if (a[i] == 'b' && i % 2 == 0) count3++;
    if (a[i] == 'b' && i % 2 != 0) count2++;
    if (a[i] == 'r' && i % 2 != 0) count4++;
  }
  cout << min(max(count1, count2), max(count3, count4)) << endl;
}
