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;
const long long M = 1e9 + 7;
const long long INF = 1e16;
const long long MAXN = 1000;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  long long cantb1 = 0, cantr1 = 0, cantb2 = 0, cantr2 = 0;
  char c[n];
  for (long long i = 0; i < n; i++) {
    cin >> c[i];
  }
  for (long long i = 0; i < n; i++) {
    if (i % 2 != 0 && c[i] != 'b') {
      cantb1++;
    }
    if (i % 2 == 0 && c[i] != 'r') {
      cantr1++;
    }
  }
  for (long long i = 0; i < n; i++) {
    if (i % 2 != 0 && c[i] != 'r') {
      cantr2++;
    }
    if (i % 2 == 0 && c[i] != 'b') {
      cantb2++;
    }
  }
  long long swap1 = min(cantr1, cantb1);
  long long paint1 = max(cantr1, cantb1) - swap1;
  long long res1 = swap1 + paint1;
  long long swap2 = min(cantr2, cantb2);
  long long paint2 = max(cantr2, cantb2) - swap2;
  long long res2 = swap2 + paint2;
  cout << min(res1, res2) << endl;
  return 0;
}
