#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  string str;
  cin >> str;
  long long r = 0, b = 0, _r = 0, _b = 0;
  for (long long i = 0; i < n; i++) {
    if (i % 2 == 0) {
      if (str[i] == 'b') r++;
    } else {
      if (str[i] == 'r') b++;
    }
  }
  for (long long i = 0; i < n; i++) {
    if (i % 2 == 0) {
      if (str[i] == 'r') _b++;
    } else {
      if (str[i] == 'b') _r++;
    }
  }
  cout << min(max(r, b), max(_r, _b));
}
