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;
bool a[100001];
int main() {
  int n;
  cin >> n;
  char c;
  int it = 0;
  int ocount = 0, zcount = 0;
  while (std::cin.get(c)) {
    if (c == 'r') a[it] = 1, ocount++, it++;
    if (c == 'b') a[it] = 0, zcount++, it++;
  }
  int no = 0;
  int nz = 0;
  for (int i = 0; i < n; i += 2) {
    if (a[i])
      no++;
    else
      nz++;
  }
  int diff = abs(ocount - zcount) / 2;
  if ((no > nz) && (ocount > zcount))
    cout << nz + diff;
  else if ((no > nz) && (ocount < zcount))
    cout << ocount - no + diff;
  else if ((no < nz) && (ocount > zcount))
    cout << zcount - nz + diff;
  else if ((no < nz) && (ocount < zcount))
    cout << no + diff;
  else if ((no == nz))
    cout << diff + min(nz, ocount - nz);
}
