#include <bits/stdc++.h>
using namespace std;
int n;
char c[100005];
int ans(int posR) {
  int wR = 0, wB = 0;
  for (int i = 1; i <= n; i++) {
    if (c[i] == 'r' && (i & 1) != posR) wR++;
    if (c[i] == 'b' && (i & 1) == posR) wB++;
  }
  return min(wR, wB) + abs(wR - wB);
}
void setup() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> c[i];
  cout << min(ans(0), ans(1));
}
void xuly() {}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  setup();
  xuly();
  return 0;
}
