#include <bits/stdc++.h>
using namespace std;
inline int getint() {
  int res = 0, fh = 1;
  char ch = getchar();
  while ((ch < '0' || ch > '9') && ch != '-') ch = getchar();
  if (ch == '-') fh = -1, ch = getchar();
  while (ch <= '9' && ch >= '0') res = res * 10 + ch - '0', ch = getchar();
  return res * fh;
}
inline long long getll() {
  long long res = 0, fh = 1;
  char ch = getchar();
  while ((ch < '0' || ch > '9') && ch != '-') ch = getchar();
  if (ch == '-') fh = -1, ch = getchar();
  while (ch <= '9' && ch >= '0') res = res * 10 + ch - '0', ch = getchar();
  return res * fh;
}
int getc() {
  char ch = getchar();
  while (ch != 'b' && ch != 'r') ch = getchar();
  if (ch == 'b')
    return 1;
  else
    return 0;
}
int n, d[10];
int a[100001];
int ans;
int main() {
  n = getint();
  for (int i = 1; i <= n; i++) a[i] = getc();
  for (int i = 1; i <= n; i++) {
    int now = i & 1;
    if (a[i] != now) d[now]++;
  }
  ans = max(d[0], d[1]);
  int res = 0;
  d[0] = 0;
  d[1] = 0;
  for (int i = 1; i <= n; i++) {
    int now = !(i & 1);
    if (a[i] != now) d[now]++;
  }
  res = max(d[0], d[1]);
  ans = min(ans, res);
  printf("%d", ans);
  return 0;
}
