#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T gcd(T a, T b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
template <class T>
inline T lcm(T a, T b) {
  return (a / gcd(a, b)) * b;
}
inline double dist(double x1, double y1, double x2, double y2) {
  return sqrt(((x1 - x2) * (x1 - x2)) + ((y1 - y2) * (y1 - y2)));
}
template <class T>
inline void deb(T a) {
  cout << a << '\n';
}
template <class T1, class T2>
inline void deb(T1 a, T2 b) {
  cout << a << ' ' << b << '\n';
}
template <class T1, class T2, class T3>
inline void deb(T1 a, T2 b, T3 c) {
  cout << a << ' ' << b << ' ' << c << '\n';
}
template <class T>
T power(T a, T b) {
  if (b == 0)
    return 1;
  else if (b % 2 == 1)
    return a * power(a, b - 1);
  else {
    T k = power(a, b / 2);
    return k * k;
  }
}
int main() {
  int t, i, j, tc = 0;
  int a, b, n;
  string s;
  while (scanf("%d", &n) == 1) {
    cin >> s;
    int r = 0, b = 0;
    for (i = 0; i <= n - 1; ++i) {
      if (s[i] == 'r')
        r++;
      else
        b++;
    }
    int c1 = 0, c2 = 0;
    for (i = 0; i <= n - 1; ++i) {
      if ((i % 2) && (s[i] == 'r'))
        c1++;
      else if (!(i % 2) && (s[i] == 'b'))
        c2++;
    }
    int ans1 = max(c1, c2);
    c1 = 0, c2 = 0;
    for (i = 0; i <= n - 1; ++i) {
      if ((i % 2) && (s[i] == 'b'))
        c1++;
      else if (!(i % 2) && (s[i] == 'r'))
        c2++;
    }
    int ans2 = max(c1, c2);
    int ans = min(ans1, ans2);
    printf("%d\n", ans);
  }
  return 0;
}
