#include <bits/stdc++.h>
using namespace std;
long long n, i, j, k, x, y, z, t, ans;
string s;
int main() {
  cin >> n;
  cin >> s;
  k = 1;
  for (i = 0; i < n; ++i) {
    if (s[i] == 'r' && i % 2 == 0) x++;
    if (s[i] == 'b' && i % 2 == 1) y++;
  }
  z = min(x, y);
  ans = z + x - z + y - z;
  x = 0;
  y = 0;
  for (i = 0; i < n; ++i) {
    if (s[i] == 'r' && i % 2 == 1) x++;
    if (s[i] == 'b' && i % 2 == 0) y++;
  }
  z = min(x, y);
  ans = min(ans, z + x - z + y - z);
  cout << ans;
}
