#include <bits/stdc++.h>
using namespace std;
const int inf = (int)(1e9) + 100;
const int mod = (int)(1e9) + 7;
const int N = (int)(1e5) + 100;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  string s, rb = "", br = "";
  cin >> n >> s;
  int r = 0, b = 0;
  for (int i = 0; i < n; i++) {
    if (i % 2 == 0)
      rb += "r", br += "b";
    else if (i % 2 == 1)
      rb += "b", br += "r";
    r += (s[i] == 'r'), b += (s[i] == 'b');
  }
  if (r == n || b == n) {
    cout << n / 2;
    return 0;
  }
  if (rb == s || br == s) return cout << 0, 0;
  int r1 = 0, b1 = 0, r2 = 0, b2 = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] != rb[i]) {
      r1 += (s[i] == 'r');
      b1 += (s[i] == 'b');
    }
    if (s[i] != br[i]) {
      r2 += (s[i] == 'r');
      b2 += (s[i] == 'b');
    }
  }
  cout << (min(max(r1, b1), max(r2, b2)));
  return 0;
}
