#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  getchar();
  int corrR = 0, corrB = 0;
  int corr1R = 0, corr1B = 0;
  for (int i = 0; i < n; i++) {
    char c = getchar();
    if (c == 'r') {
      if (i % 2 == 0) {
        corrR++;
      } else {
        corr1R++;
      }
    } else {
      if (i % 2 != 0) {
        corrB++;
      } else {
        corr1B++;
      }
    }
  }
  int first = max((n + 1) / 2 - corrR, n / 2 - corrB);
  int second = max((n + 1) / 2 - corr1B, n / 2 - corr1R);
  cout << min(first, second);
  return 0;
}
