#include <bits/stdc++.h>
using namespace std;
const long long MAXN = (long long)1e6 + 7;
const long long INF = (long long)2147483647;
const long long LINF = (long long)1e18;
const int MOD = (long long)1e4 + 7;
int n, a[100003], k;
string s;
int main() {
  int bb1 = 0, bb2 = 0, br1 = 0, br2 = 0, ans1, ans2;
  cin >> n;
  cin >> s;
  for (int i = 0; i < (int)n; i++) {
    if (s[i] == 'r' && i % 2 == 0) br1++;
    if (s[i] == 'b' && i % 2 == 1) bb1++;
  }
  ans1 = max(bb1, br1);
  for (int i = 0; i < (int)n; i++) {
    if (s[i] == 'r' && i % 2 == 1) br2++;
    if (s[i] == 'b' && i % 2 == 0) bb2++;
  }
  ans2 = max(bb2, br2);
  cout << min(ans1, ans2);
}
