#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e9 + 7;
vector<pair<long long, long long> > v;
int main() {
  ios_base::sync_with_stdio(0);
  long long n;
  cin >> n;
  v.resize(n);
  string s;
  cin >> s;
  long long ans = 0;
  long long lr = 0, lb = 0;
  for (int i = 0; i < n; ++i) {
    if (i % 2) {
      if (s[i] != 'r') {
        ++lb;
      }
    } else {
      if (s[i] != 'b') {
        ++lr;
      }
    }
  }
  ans = max(lr, lb);
  lr = 0, lb = 0;
  for (int i = 0; i < n; ++i) {
    if (i % 2 == 0) {
      if (s[i] != 'r') {
        ++lb;
      }
    } else {
      if (s[i] != 'b') {
        ++lr;
      }
    }
  }
  ans = min(max(lr, lb), ans);
  cout << ans;
  return 0;
}
