#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int i, n;
  cin >> n;
  string A;
  cin >> A;
  int b[2], r[2];
  b[0] = b[1] = r[0] = r[1] = 0;
  for (i = 0; i < n; i++) {
    if (i % 2 == 0) {
      if (A[i] == 'r') {
        r[0]++;
      } else {
        b[1]++;
      }
    } else {
      if (A[i] == 'r') {
        r[1]++;
      } else {
        b[0]++;
      }
    }
  }
  int temp;
  temp = min(b[0], r[0]);
  if (temp != b[0]) {
    r[0] = b[0];
    b[0] = temp;
  }
  temp = min(b[1], r[1]);
  if (temp != b[1]) {
    r[1] = b[1];
    b[1] = temp;
  }
  cout << min(r[1], r[0]) << "\n";
  return 0;
}
