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;
using VI = vector<int>;
using VVI = vector<VI>;
using VB = vector<bool>;
using VVB = vector<VB>;
using VD = vector<double>;
using VVD = vector<VD>;
using VS = vector<string>;
using PII = pair<int, int>;
using VPII = vector<PII>;
using VL = vector<long long>;
using VVL = vector<VL>;
int n;
string s;
int solve() {
  int n = (int)s.size();
  if (n == 1) return 0;
  int ret = 0;
  int nr = 0, nb = 0;
  for (int i = 0; i < n; ++i) {
    if (i % 2 == 0)
      nr += s[i] != 'r';
    else
      nb += s[i] != 'b';
  }
  ret += min(nr, nb);
  ret += abs(nr - nb);
  nr = nb = 0;
  for (int i = 0; i < n; ++i) {
    if (i % 2 == 0)
      nr += s[i] != 'b';
    else
      nb += s[i] != 'r';
  }
  int tmp = min(nr, nb);
  tmp += abs(nr - nb);
  return min(ret, tmp);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> s;
  cout << solve() << endl;
  return 0;
}
