#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, i, b = 0, r = 0, a;
  string input;
  cin >> n;
  cin >> input;
  if (n == 1)
    cout << 0 << "\n";
  else if (n == 2) {
    if (input[0] == input[1])
      cout << 1 << endl;
    else
      cout << 0 << "\n";
  } else {
    for (i = 0; i < n; i += 2)
      if (input[i] != 'b') b++;
    for (i = 1; i < n; i += 2)
      if (input[i] != 'r') r++;
    a = max(b, r);
    b = 0;
    r = 0;
    for (i = 0; i < n; i += 2)
      if (input[i] != 'r') b++;
    for (i = 1; i < n; i += 2)
      if (input[i] != 'b') r++;
    b = max(b, r);
    cout << min(a, b) << "\n";
  }
  return 0;
}
