#include <bits/stdc++.h>
using namespace std;
int case1(string str1, int n) {
  char ch0 = 'r';
  char ch1 = 'b';
  int oddiff = 0, evendiff = 0;
  for (int i = 0; i < n; i++) {
    if (i % 2 == 0) {
      if (str1[i] != ch0) {
        evendiff++;
      }
    } else {
      if (str1[i] != ch1) {
        oddiff++;
      }
    }
  }
  return max(evendiff, oddiff);
}
int case2(string str1, int n) {
  char ch0 = 'b';
  char ch1 = 'r';
  int oddiff = 0, evendiff = 0;
  for (int i = 0; i < n; i++) {
    if (i % 2 == 0) {
      if (str1[i] != ch0) {
        evendiff++;
      }
    } else {
      if (str1[i] != ch1) {
        oddiff++;
      }
    }
  }
  return max(evendiff, oddiff);
}
int main() {
  int n;
  cin >> n;
  string str;
  cin >> str;
  int temp1, temp2;
  temp1 = case1(str, n);
  temp2 = case2(str, n);
  int ans = min(temp1, temp2);
  cout << ans;
  return 0;
}
