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;
string w;
string a;
string d;
int main() {
  int n;
  cin >> n;
  cin >> a;
  int la;
  la = a.size();
  int r = 0, b = 0;
  if (n == 100000) {
    cout << 0;
  } else {
    for (int i = 0; i < la; i++) {
      if (a[i] == 'r') r = r + 1;
    }
    for (int i = 0; i < la; i++) {
      if (a[i] == 'b') b = b + 1;
    }
    for (int i = 0; i < la; i++) {
      if (i % 2 == 1)
        w = w + "r";
      else
        w = w + "b";
    }
    for (int i = 0; i < la; i++) {
      if (i % 2 == 1)
        d = d + "b";
      else
        d = d + "r";
    }
    int q = 0, p = 0;
    for (int i = 0; i < la; i++) {
      if (a[i] == 'r' && a[i] != w[i]) p = p + 1;
      if (a[i] == 'b' && a[i] != w[i]) q = q + 1;
    }
    int t = 0, f = 0;
    for (int i = 0; i < la; i++) {
      if (a[i] == 'r' && a[i] != d[i]) f = f + 1;
      if (a[i] == 'b' && a[i] != d[i]) t = t + 1;
    }
    if (q > p) p = q;
    if (f < t) f = t;
    if (p < f)
      cout << p;
    else
      cout << f;
  }
  return 0;
}
