#include <bits/stdc++.h>
using namespace std;
int Comp(string x, int M) {
  string z = "rb";
  vector<vector<int> > ind(2);
  for (int i = 0, j = M; i < x.size(); i++, j = !j)
    if (x[i] != z[j]) ind[j].push_back(i);
  int minm = min(ind[0].size(), ind[1].size());
  for (int i = 0; i < min(ind[0].size(), ind[1].size()); i++)
    swap(x[ind[0][i]], x[ind[1][i]]);
  for (int i = 0, j = M; i < x.size(); i++, j = !j)
    if (x[i] != z[j]) minm++;
  return minm;
}
int main() {
  int n;
  string x;
  cin >> n >> x;
  cout << min(Comp(x, 0), Comp(x, 1)) << endl;
}
