#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, c1, c2;
  char s[100010];
  while (cin >> n) {
    cin >> s;
    c1 = 0;
    c2 = 0;
    for (int i = 0; i < n; i++)
      if (i % 2 == 0) {
        if (s[i] != 'r') c1++;
      } else {
        if (s[i] != 'b') c2++;
      }
    int ans1 = abs(c1 - c2) + min(c1, c2);
    c1 = 0;
    c2 = 0;
    for (int i = 0; i < n; i++)
      if (i % 2 == 0) {
        if (s[i] != 'b') c1++;
      } else {
        if (s[i] != 'r') c2++;
      }
    int ans2 = abs(c1 - c2) + min(c1, c2);
    cout << min(ans1, ans2) << endl;
  }
}
