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;
void solve();
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(NULL);
  solve();
  return 0;
}
void solve() {
  int64_t n;
  cin >> n;
  string a;
  cin >> a;
  bool flag = true;
  int64_t wb = 0, wr = 0;
  int64_t bw = 0, rw = 0;
  for (int64_t i = 0; i < a.length(); i++) {
    if (flag) {
      flag = false;
      if (a[i] == 'b') {
        wb++;
      } else {
        rw++;
      }
    } else {
      flag = true;
      if (a[i] == 'r') {
        wr++;
      } else {
        bw++;
      }
    }
  }
  int64_t ans;
  int64_t temp = min(wb, wr);
  wb -= temp;
  wr -= temp;
  temp += (wb + wr);
  ans = temp;
  temp = min(bw, rw);
  bw -= temp;
  rw -= temp;
  temp += (bw + rw);
  ans = min(temp, ans);
  cout << ans << "\n";
}
