#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  int ans_1 = 0;
  int wr = 0, wb = 0;
  for (int i = 0; i < n; i++) {
    if (i % 2 == 0 && s[i] != 'b') wb++;
    if (i % 2 != 0 && s[i] != 'r') wr++;
  }
  ans_1 = max(wr, wb);
  wr = 0, wb = 0;
  for (int i = 0; i < n; i++) {
    if (i % 2 == 0 && s[i] != 'r') wr++;
    if (i % 2 != 0 && s[i] != 'b') wb++;
  }
  int ans_2 = max(wr, wb);
  cout << min(ans_1, ans_2) << "\n";
  return 0;
}
