#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  int n, x = 0, y = 0, p = 0, q = 0;
  char a, b;
  string s;
  cin >> n >> s;
  if (s[0] == 'b')
    a = 'b', b = 'r';
  else
    b = 'b', a = 'r';
  if (n == 2) {
    if (s[0] != s[1])
      cout << 0;
    else
      cout << 1;
  } else if (n == 1)
    cout << 0;
  else {
    for (int i = 0; i < n; ++i) {
      if (i & 1) {
        if (s[i] != b)
          x++;
        else
          p++;
      } else {
        if (s[i] != a)
          y++;
        else
          q++;
      }
    }
    cout << min(max(x, y), max(p, q));
  }
  return 0;
}
