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;
int dx[] = {-1, 0, 1, 0};
int dy[] = {0, 1, 0, -1};
int dx2[] = {1, -1, -1, 1, 0, 0, -1, 1};
int dy2[] = {1, -1, 1, -1, 1, -1, 0, 0};
int kmx[] = {-1, -1, 1, 1, 2, -2, 2, -2};
int kmy[] = {2, -2, 2, -2, -1, -1, 1, 1};
class Timer {
 public:
  clock_t T;
  Timer() { T = clock(); }
  ~Timer() {
    fprintf(stderr, "\n%.3f\n", double(clock() - T) / CLOCKS_PER_SEC);
  }
};
int read() {
  int x;
  scanf("%d", &x);
  return x;
}
long long readL() {
  long long x;
  scanf("%lld", &x);
  return x;
}
const int N = 1e5 + 5;
int n;
char s[N];
int main() {
  n = read();
  scanf("%s", s);
  int cntb = 0;
  int cntr = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == 'b')
      cntb++;
    else
      cntr++;
  }
  int colb1 = (n / 2) > cntb ? (n / 2) - cntb : 0;
  int colr1 = ((n + 1) / 2) > cntr ? ((n + 1) / 2) - cntr : 0;
  int colr2 = (n / 2) > cntr ? (n / 2) - cntr : 0;
  int colb2 = ((n + 1) / 2) > cntb ? ((n + 1) / 2) - cntb : 0;
  int t1 = colb1;
  int t2 = colb2;
  int t3 = colr1;
  int t4 = colr2;
  int e1 = 0;
  int e2 = 0;
  for (int i = 0; i < n; i++) {
    if (i & 1) {
      if (s[i] != 'b') {
        if (t1)
          t1--;
        else
          e1++;
      }
    } else {
      if (s[i] != 'r') {
        if (t3)
          t3--;
        else
          e1++;
      }
    }
    if (i & 1) {
      if (s[i] != 'r') {
        if (t4)
          t4--;
        else
          e2++;
      }
    } else {
      if (s[i] != 'b') {
        if (t2)
          t2--;
        else
          e2++;
      }
    }
  }
  printf("%d\n", min(e1 / 2 + colb1 + colr1, e2 / 2 + colr2 + colb2));
  return 0;
}
