#include <bits/stdc++.h>
using namespace std;
int dcmp(double x, double y) {
  return fabs(x - y) <= 1e-9 ? 0 : x < y ? -1 : 1;
}
int n, holder1, holder2, right1, left1, right2, left2;
string s;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  cin >> n;
  cin >> s;
  for (int i = 0; i < n; i++) {
    if (i % 2 == 0 && s[i] != 'r') {
      right1++;
    } else if (i % 2 == 1 && s[i] != 'b') {
      left1++;
    }
  }
  holder1 = max(right1, left1);
  for (int i = 0; i < n; i++) {
    if (i % 2 == 0 && s[i] != 'b') {
      left2++;
    } else if (i % 2 == 1 && s[i] != 'r') {
      right2++;
    }
  }
  holder2 = max(left2, right2);
  cout << min(holder1, holder2) << '\n';
  return 0;
}
