#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;
}
