#include <bits/stdc++.h>
using namespace std;
string s;
int main() {
  int n, r_r = 0, b_r = 0, r_b = 0, b_b = 0;
  cin >> n;
  cin >> s;
  for (int i = 0; i < n; i++) {
    if (s[i] == 'r') {
      if (i % 2 == 0)
        r_b++;
      else
        r_r++;
    }
    if (s[i] == 'b') {
      if (i % 2 == 0)
        b_r++;
      else
        b_b++;
    }
  }
  cout << min(max(r_b, b_b), max(r_r, b_r));
  return 0;
}
