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;
queue<pair<int, int> > q;
vector<pair<int, int> > v[100005];
char a[100005];
int n;
void s(int &x) {
  int t;
  scanf("%d", &t);
  x = t;
}
long long pow(long long x, long long y) {
  if (y == 1LL) return x % 1000000007;
  long long temp = pow(x, y / 2LL);
  if (y % 2LL == 0LL) return temp * temp % 1000000007;
  return ((temp * temp % 1000000007) * x) % 1000000007;
}
int main() {
  s(n);
  scanf("%s", a);
  int cola = 0, colb = 0;
  for (int i = 0; i < n; i++) {
    if (i % 2 == 0 && a[i] == 'b') colb++;
    if (i % 2 == 1 && a[i] == 'r') cola++;
  }
  int temp = min(cola, colb);
  int ans = temp + max(cola - temp, colb - temp);
  cola = colb = 0;
  for (int i = 0; i < n; i++) {
    if (i % 2 == 1 && a[i] == 'b') cola++;
    if (i % 2 == 0 && a[i] == 'r') colb++;
  }
  temp = min(cola, colb);
  ans = min(ans, temp + max(cola - temp, colb - temp));
  printf("%d", ans);
}
