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