#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, j, k, c = 0, d = 0, a = 0, b = 0, ans;
  string str;
  cin >> n;
  cin >> str;
  if (n == 1)
    cout << 0 << endl;
  else {
    for (i = 0; str[i] != '\0'; i++) {
      if (str[i] == 'b') {
        if (i % 2 == 0)
          a++;
        else
          b++;
      }
      if (str[i] == 'r') {
        if (i % 2 == 0)
          c++;
        else
          d++;
      }
    }
    ans = min(max(a, d), max(b, c));
    cout << ans << endl;
  }
}
