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