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 int S = 100003;
const int MOD = 1e9 + 7;
const double pi = 2 * acos(0.0);
int _I() {
  int x;
  scanf("%d", &x);
  return x;
}
long long _LL() {
  long long x;
  scanf("%lld", &x);
  return x;
}
int dirX[] = {1, 0, -1, 0, 1, -1, 1, -1};
int dirY[] = {0, 1, 0, -1, 1, -1, -1, 1};
int rX[] = {1, 1, 2, 2, -1, -1, -2, -2};
int rY[] = {2, -2, 1, -1, 2, -2, 1, -1};
template <class T>
T Distance(T x1, T y1, T x2, T y2) {
  return sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
};
int sset(int N, int pos) { return N = N | (1 << pos); }
bool check(int N, int pos) { return (bool)(N & (1 << pos)); }
int reset(int N, int pos) { return N = N & ~(1 << pos); }
int main() {
  int n = _I();
  string s;
  cin >> s;
  int r = 0, b = 0, x = 0, y = 0;
  for (int i = 0; i < n; i++) {
    if (i & 1 && s[i] == 'r')
      r++;
    else if (!(i & 1) && s[i] == 'b')
      b++;
  }
  x += min(r, b);
  x += abs(r - b);
  r = 0, b = 0;
  for (int i = 0; i < n; i++) {
    if (i & 1 && s[i] == 'b')
      b++;
    else if (!(i & 1) && s[i] == 'r')
      r++;
  }
  y += min(r, b);
  y += abs(r - b);
  printf("%d\n", min(x, y));
  return 0;
}
