#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  long int n;
  while (cin >> n) {
    cin >> s;
    int r1 = 0, b1 = 0, r2 = 0, b2 = 0;
    for (int i = 0; i < n; i++) {
      if (i % 2 == 0) {
        if (s[i] == 'b') r1++;
      } else {
        if (s[i] == 'r') b1++;
      }
      if (i % 2 == 0) {
        if (s[i] == 'r') r2++;
      } else {
        if (s[i] == 'b') b2++;
      }
    }
    int temp1 = (r1 > b1 ? r1 : b1);
    int temp2 = (r2 > b2 ? r2 : b2);
    printf("%d\n", (temp1 < temp2 ? temp1 : temp2));
  }
  return 0;
}
