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;
const long long int mxN = 1e5 + 5;
const long long int MOD = 1e9 + 7;
long long int one = 0;
long long int ceil1(long long int a, long long int b) {
  if (a % b == 0)
    return (a / b);
  else
    return ((a / b) + 1);
}
void solve() {
  long long int n;
  cin >> n;
  string s;
  cin >> s;
  long long int x = 0, y = 0;
  for (long long int i = 0; i < n; i++) {
    if (i & 1) {
      if (s[i] != 'r') x++;
    } else {
      if (s[i] != 'b') y++;
    }
  }
  long long int ans = INT_MAX;
  ans = min(ans, max(x, y));
  x = 0, y = 0;
  for (long long int i = 0; i < n; i++) {
    if (i & 1) {
      if (s[i] != 'b') x++;
    } else {
      if (s[i] != 'r') y++;
    }
  }
  ans = min(ans, max(x, y));
  cout << ans << "\n";
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int t = 1;
  while (t--) {
    one++;
    solve();
  }
  return 0;
}
