#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 1;
void solve() {
  int n;
  string s;
  cin >> n >> s;
  int a = 0, b = 0, c = 0, d = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == 'r') {
      if ((i + 1) % 2 == 0)
        a += 1;
      else
        b += 1;
    } else {
      if ((i + 1) % 2 == 0)
        c += 1;
      else
        d += 1;
    }
  }
  int ans = max(c, b);
  ans = min(ans, max(a, d));
  cout << ans << "\n";
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  t = 1;
  ;
  while (t--) solve();
}
