#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  double m11 = 0, m12 = 0;
  for (int i = 0; i < n; i++) {
    if (i % 2 == 0) {
      if (s[i] == 'r') m11++;
    } else {
      if (s[i] == 'b') m12++;
    }
  }
  double m21 = 0, m22 = 0;
  for (int i = 0; i < n; i++) {
    if (i % 2 == 0) {
      if (s[i] == 'b') m21++;
    } else {
      if (s[i] == 'r') m22++;
    }
  }
  cout << min(min(m11, m12) + abs(m11 - m12), min(m21, m22) + abs(m21 - m22))
       << endl;
}
