#include <bits/stdc++.h>
using namespace std;
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cerr << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cerr.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
template <class T>
T max(T a, T b, T c) {
  return ((a > b) ? ((a > c) ? a : c) : ((b > c) ? b : c));
}
template <class T>
T min(T a, T b, T c) {
  return ((a < b) ? ((a < c) ? a : c) : ((b < c) ? b : c));
}
const int MOD = (1e9) + 7;
const int MAXN = (1e5) + 9;
int T = 1, N = 1;
int main() {
  ios_base ::sync_with_stdio(false);
  cin.tie(NULL);
  while (T--) {
    int n;
    cin >> n;
    string str;
    cin >> str;
    int foo = 0, bar = 0;
    int a = 0, b = 0;
    for (int i = 0; i < n; i++) {
      if (i % 2 == 0 && str[i] == 'r') {
        a++;
      } else if (i % 2 == 1 && str[i] == 'b') {
        b++;
      }
      foo = max(a, b);
    }
    a = b = 0;
    for (int i = 0; i < n; i++) {
      if (i % 2 == 0 && str[i] == 'b') {
        a++;
      } else if (i % 2 == 1 && str[i] == 'r') {
        b++;
      }
      bar = max(a, b);
    }
    cout << min(foo, bar) << "\n";
  }
  return 0;
}
