166
rbbbbbbbbbbbbrbrrbbrbbbrbbbbbbbbbbrbbbbbbrbbbrbbbbbrbbbbbbbrbbbbbbbrbbrbbbbbbbbrbbbbbbbbbbbbbbrrbbbrbbbbbbbbbbbbbbrbrbbbbbbbbbbbrbbbbbbbbbbbbbbrbbbbbbbbbbbbbbbbbbbbbb
 7
rrbrbrb
 1
r
 2
bb
 18
rrrrrrrrrrrrrrrrrb
 8
rbbrbrbr
 1
b
 13
rbbbrbrrbrrbb
 100
brbbbrrrbbrbrbbrbbrbbbbrbbrrbbbrrbbbbrbrbbbbbbbbbbbbbbbbrrrrbbbbrrrbbbbbbbrbrrbrbbbbrrrbbbbrbbrbbbrb
 2
rb
 2
rr
 2
br

70
 1
 0
 1
 8
 1
 0
 3
 34
 0
 1
 0

#include <bits/stdc++.h>
using namespace std;
inline int mod(int x) {
  if (x < 0) return -x;
  return x;
}
string x;
int n;
int a[100001], pos1[100001], pos2[100001];
int Convert(int p[], int q[]) {
  int sump = 0, sumq = 0;
  for (int i = 1; i <= n; i++) sump += p[i], sumq += q[i];
  int ans = mod(sumq - sump);
  for (int i = 1; i <= n; i++)
    if (sump < sumq)
      if (p[i] == 0 && q[i] == 1) {
        p[i] = 1;
        sump++;
      } else if (sump > sumq)
        if (p[i] == 1 && q[i] == 1) {
          p[i] = 0;
          sump--;
        }
  int hdist = 0;
  for (int i = 1; i <= n; i++)
    if (p[i] != q[i]) hdist++;
  ans = ans + hdist / 2;
  return ans;
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> x;
  for (int i = 0; i < x.size(); i++) a[i + 1] = (x[i] == 'r') ? 1 : 0;
  for (int i = 1; i <= n; i = i + 2) pos1[i] = 1, pos2[i] = 0;
  for (int i = 2; i <= n; i = i + 2) pos1[i] = 0, pos2[i] = 1;
  cout << min(Convert(a, pos1), Convert(a, pos2)) << endl;
  return 0;
}
