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 double pi = acos(-1.0);
const double E = exp(1.0);
const int MAXN = 1e5 + 9;
const int MOD = 1e9 + 7;
const int INF = 0x3f3f3f3f;
bool scan_d(int &s_num) {
  char s_in;
  int s_sign;
  double s_bit = 0.1;
  if (s_in = getchar(), s_in == EOF) return false;
  while (s_in != '-' && s_in != '.' && (s_in < '0' || s_in > '9'))
    s_in = getchar();
  if (s_in == '-') {
    s_sign = -1;
    s_num = 0;
  } else {
    s_sign = 1;
    s_num = s_in - '0';
  }
  while (s_in = getchar(), s_in >= '0' && s_in <= '9')
    s_num = s_num * 10 + (s_in - '0');
  if (s_in == ' ' || s_in == '\n') {
    s_num *= s_sign;
    return true;
  }
  while (s_in = getchar(), s_in >= '0' && s_in <= '9') {
    s_num = (s_in - '0') * s_bit;
    s_bit /= 10;
  }
  s_num *= s_sign;
  return true;
}
int n, b, r, b2, r2;
char s[100009];
void Init() {
  scanf("%d", &n);
  scanf("%s", s);
}
void Solve() {
  for (int i = 0; i <= n - 1; i++) {
    if (i % 2) {
      if (s[i] == 'r')
        r++;
      else
        b2++;
    } else if (s[i] == 'b')
      b++;
    else
      r2++;
  }
  printf("%d\n", min(max(b, r), max(b2, r2)));
}
int main() {
  int _T = 1;
  while (_T--) {
    Init();
    Solve();
  }
  return 0;
}
