#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  string s;
  int a = 0, b = 0, a1 = 0, b1 = 0;
  cin >> n;
  cin >> s;
  for (int i = 0; i < n; i++) {
    if (i % 2 == 1) {
      if (s[i] == 'b')
        a++;
      else if (s[i] == 'r')
        a1++;
    } else {
      if (s[i] == 'r')
        b++;
      else if (s[i] == 'b')
        b1++;
    }
  }
  int num;
  num = min(a, b) + fabs(a - b);
  int sum;
  sum = min(a1, b1) + fabs(a1 - b1);
  int end;
  end = min(num, sum);
  cout << end << endl;
}
