#include <bits/stdc++.h>
using namespace std;
inline long long in() {
  int32_t x;
  scanf("%d", &x);
  return x;
}
inline long long lin() {
  long long x;
  scanf("%lld", &x);
  return x;
}
inline string get() {
  char ch[2000010];
  scanf("%s", ch);
  return ch;
}
inline void read(long long *a, long long n) {
  for (long long i = 0; i < n; i++) a[i] = in();
}
template <class blank>
inline void out(blank x) {
  cout << x << "\n";
  exit(0);
}
const long long maxn = 1e5 + 10;
const long long maxm = 1e6 + 10;
const long long maxlg = 21;
const long long base = 29;
const long long mod = 1e9 + 7;
const long long INF = 1e18 + 10;
const long long SQ = 317 + 5;
long long a[maxn];
long long res = INF;
int32_t main() {
  long long n = in();
  string s = get();
  for (long long i = 0; i < n; i++) a[i] = s[i] == 'r';
  for (long long start = 0; start <= 1; start++) {
    long long a = 0, b = 0;
    for (long long pt = 0; pt < n; pt++) {
      if (::a[pt] != (start ^ (pt % 2))) {
        if (::a[pt])
          a++;
        else
          b++;
      }
    }
    res = min(res, max(a, b));
  }
  cout << res << "\n";
}
