#include <bits/stdc++.h>
using namespace std;
char s[100500];
int main() {
  int n;
  cin >> n;
  scanf("%s", s);
  int r1 = 0, r2 = 0;
  int b1 = 0, b2 = 0;
  for (int i = 0; i < n; i++) {
    if (i % 2) {
      if (s[i] == 'b')
        b1++;
      else
        r1++;
    } else {
      if (s[i] == 'b')
        b2++;
      else
        r2++;
    }
  }
  cout << min(n - r1 - b2 - min(r2, b1), n - r2 - b1 - min(r1, b2)) << endl;
}
