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;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
long long lcm(long long a, long long b) { return a * (b / gcd(a, b)); }
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  string s;
  cin >> n;
  cin >> s;
  int r = 0, b = 0;
  for (int i = 0; i < n; ++i) {
    if (s[i] == 'r') r++;
    if (s[i] == 'b') b++;
  }
  int ans1 = 0, ans2 = 0;
  int red = 0;
  for (int i = 1; i < n; i += 2) {
    if (s[i] == 'r') red++;
  }
  for (int i = 0; i < n; i += 2) {
    if (s[i] == 'b') {
      red = max(red - 1, 0);
      ans1++;
    }
  }
  ans1 += red;
  int black = 0;
  for (int i = 1; i < n; i += 2) {
    if (s[i] == 'b') black++;
  }
  for (int i = 0; i < n; i += 2) {
    if (s[i] == 'r') {
      black = max(black - 1, 0);
      ans2++;
    }
  }
  ans2 += black;
  cout << min(ans1, ans2) << endl;
  return 0;
}
