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 main() {
  long long int n;
  cin >> n;
  string s;
  cin >> s;
  long long int len = s.size();
  string res = "";
  string res1 = "";
  for (long long int i = 0; i < len; i++) {
    if (i % 2 == 0) {
      res += 'r';
    } else {
      res += 'b';
    }
  }
  for (long long int i = 0; i < len; i++) {
    if (i % 2 == 0) {
      res1 += 'b';
    } else {
      res1 += 'r';
    }
  }
  long long int ans1 = 0, ans2 = 0;
  for (long long int i = 0; i < len; i++) {
    if (res[i] == 'r' && s[i] != 'r') ans1++;
    if (res[i] == 's' && s[i] != 's') ans2++;
  }
  ans1 = max(ans1, ans2);
  long long int ans3 = 0, ans4 = 0;
  for (long long int i = 0; i < len; i++) {
    if (res1[i] == 'b' && s[i] != 'b') ans3++;
    if (res1[i] == 'r' && s[i] != 'r') ans4++;
  }
  ans3 = max(ans3, ans4);
  cout << min(ans1, ans3) << endl;
  return 0;
}
