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() {
  long long int n, m, x, y, i, j, ans = 0, c = 0, sum = 0;
  string s;
  cin >> n >> s;
  for (auto ch : s)
    if (ch == 'r') c++;
  if (c == 0 || c == n) {
    cout << n / 2 << "\n";
    return;
  }
  long long int cr = 0, cb = 0;
  for (i = 0; i < n; i++) {
    if (i % 2 == 0)
      if (s[i] == 'r') cr++;
    if (i % 2 != 0)
      if (s[i] == 'b') cb++;
  }
  ans = max(cr, cb);
  cr = 0, cb = 0;
  for (i = 0; i < n; i++) {
    if (i % 2 != 0)
      if (s[i] == 'r') cr++;
    if (i % 2 == 0)
      if (s[i] == 'b') cb++;
  }
  ans = min(ans, max(cr, cb));
  cout << ans << "\n";
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
