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;
template <class T>
inline T gcd(T a, T b) {
  while (b) {
    a %= b;
    swap(a, b);
  }
  return a;
}
template <class T>
inline T lcm(T a, T b) {
  return a / gcd(a, b) * b;
}
inline int nxt() {
  int wow;
  scanf("%d", &wow);
  return wow;
}
inline long long int lxt() {
  long long int wow;
  scanf("%lld", &wow);
  return wow;
}
inline double dxt() {
  double wow;
  scanf("%lf", &wow);
  return wow;
}
int one1[100002], two1[100002];
int main() {
  int m = nxt();
  string s, s1, s2;
  cin >> s;
  for (int i = 0; i < m; i++) {
    if (i % 2 == 0)
      s1.push_back('r');
    else
      s1.push_back('b');
    if (i % 2 == 0)
      s2.push_back('b');
    else
      s2.push_back('r');
  }
  for (int i = 0; i < m; i++) {
    if (s[i] != s1[i]) one1[i] = 1;
    if (s[i] != s2[i]) two1[i] = 1;
  }
  int b1 = 0, r1 = 0, b2 = 0, r2 = 0, ans1, ans2;
  for (int i = 0; i < m; i++) {
    if (one1[i] == 1 && s[i] == 'b') b1++;
    if (one1[i] == 1 && s[i] == 'r') r1++;
    if (two1[i] == 1 && s[i] == 'b') b2++;
    if (two1[i] == 1 && s[i] == 'r') r2++;
  }
  ans1 = max(b1, r1);
  ans2 = max(b2, r2);
  cout << min(ans1, ans2) << endl;
  return 0;
}
