#include <bits/stdc++.h>
using namespace std;
using VI = vector<int>;
using VVI = vector<VI>;
using VB = vector<bool>;
using VVB = vector<VB>;
using VD = vector<double>;
using VVD = vector<VD>;
using VS = vector<string>;
using PII = pair<int, int>;
using VPII = vector<PII>;
using VL = vector<long long>;
using VVL = vector<VL>;
int n;
string s;
int solve() {
  int n = (int)s.size();
  if (n == 1) return 0;
  int ret = 0;
  int nr = 0, nb = 0;
  for (int i = 0; i < n; ++i) {
    if (i % 2 == 0)
      nr += s[i] != 'r';
    else
      nb += s[i] != 'b';
  }
  ret += min(nr, nb);
  ret += abs(nr - nb);
  nr = nb = 0;
  for (int i = 0; i < n; ++i) {
    if (i % 2 == 0)
      nr += s[i] != 'b';
    else
      nb += s[i] != 'r';
  }
  int tmp = min(nr, nb);
  tmp += abs(nr - nb);
  return min(ret, tmp);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> s;
  cout << solve() << endl;
  return 0;
}
