#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, count = 0, ans;
  cin >> n;
  string s;
  cin >> s;
  long long r = 0, b = 0;
  for (long long i = 0; i < n; i++)
    if (s[i] == 'r')
      r++;
    else if (s[i] == 'b')
      b++;
  for (long long i = 0; i < n; i++)
    if (i % 2 == 0 && s[i] != 'r')
      count++;
    else if (i % 2 == 1 && s[i] != 'b')
      count++;
  long long rx = n % 2 == 1 ? 1 + (long long)(n / 2) : n / 2;
  ans = abs(r - rx);
  count -= ans;
  ans += (count / 2);
  count = 0;
  for (long long i = 0; i < n; i++)
    if (i % 2 == 1 && s[i] != 'r')
      count++;
    else if (i % 2 == 0 && s[i] != 'b')
      count++;
  ans = min(ans, abs(b - rx) + (count - abs(b - rx)) / 2);
  cout << ans;
}
