#include <bits/stdc++.h>
using namespace std;
int crc[2][2];
int main() {
  int n;
  string s;
  bitset<100005> cr;
  cin >> n;
  cin >> s;
  for (int i = 0; i < n; ++i) {
    if (s[i] == 'r')
      cr[i] = 1;
    else
      cr[i] = 0;
  }
  for (int color = 0; color <= 1; ++color)
    for (int offset = 0; offset <= 1; ++offset) {
      int nr = 0;
      for (int i = offset; i < n; i += 2)
        if (cr[i] == color) ++nr;
      crc[color][offset] = nr;
    }
  int mintotal = n;
  for (int color = 0; color <= 1; ++color)
    for (int offset = 0; offset <= 1; ++offset) {
      int total = 0;
      if (crc[color][offset] < (n - offset + 1) / 2) {
        total += (n - offset + 1) / 2 - crc[color][offset];
        if (crc[1 - color][1 - offset] < (n + offset) / 2 - total)
          total += (n + offset) / 2 - total - crc[1 - color][1 - offset];
      } else {
        total = (n + offset) / 2 - crc[1 - color][1 - offset];
      }
      mintotal = min(total, mintotal);
    }
  cout << mintotal;
  return 0;
}
