#include <bits/stdc++.h>
using namespace std;
int main() {
  long int k;
  cin >> k;
  string s;
  cin >> s;
  long int ob = 0, ort = 0, eb = 0, er = 0;
  for (long int i = 0; i < k && i != k + 1; i += 2) {
    if (s[i] == 'r')
      er++;
    else
      eb++;
  }
  for (int i = 1; i < k && i != k + 1; i += 2) {
    if (s[i] == 'r')
      ort++;
    else
      ob++;
  }
  long int ans = 0;
  if (er + ob > eb + ort) {
    if (eb > ort)
      ans = eb;
    else
      ans = ort;
  } else {
    if (er > ob)
      ans = er;
    else
      ans = ob;
  }
  cout << ans << endl;
  return 0;
}
