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;
int main() {
  int n, i, k, l, p, m;
  string str;
  cin >> n;
  cin >> str;
  int blceven = 0;
  int blcodd = 0;
  int redeven = 0;
  int redodd = 0;
  for (i = 0; i < n; i++) {
    if (i % 2 == 0) {
      if (str[i] == 'b') {
        blceven++;
      } else {
        redeven++;
      }
    } else {
      if (str[i] == 'b') {
        blcodd++;
      } else
        redodd++;
    }
  }
  int ans1;
  int ans2;
  if (redeven == blcodd) {
    ans1 = redeven;
  } else {
    ans1 = min(redeven, blcodd) + abs(redeven - blcodd);
  }
  if (redodd == blceven) {
    ans2 = redodd;
  } else {
    ans2 = min(redodd, blceven) + abs(redodd - blceven);
  }
  cout << min(ans1, ans2) << endl;
  return 0;
}
