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;
long long int n, i, counta, countb;
string s;
long long int rbr() {
  long long int nb = 0, nr = 0, count = 0;
  for (i = 0; i < n; i++) {
    if ((i % 2) == 0) {
      if (s[i] != 'r') nr++;
    } else {
      if (s[i] != 'b') nb++;
    }
  }
  count = min(nr, nb);
  count += (abs(nr - nb));
  return count;
}
long long int brb() {
  long long int nb = 0, nr = 0, count = 0;
  for (i = 0; i < n; i++) {
    if ((i % 2) == 0) {
      if (s[i] != 'b') nb++;
    } else {
      if (s[i] != 'r') nr++;
    }
  }
  count = min(nr, nb);
  count += (abs(nr - nb));
  return count;
}
int main() {
  cin >> n >> s;
  counta = rbr();
  countb = brb();
  cout << (min(counta, countb));
  return 0;
}
