166
rbbbbbbbbbbbbrbrrbbrbbbrbbbbbbbbbbrbbbbbbrbbbrbbbbbrbbbbbbbrbbbbbbbrbbrbbbbbbbbrbbbbbbbbbbbbbbrrbbbrbbbbbbbbbbbbbbrbrbbbbbbbbbbbrbbbbbbbbbbbbbbrbbbbbbbbbbbbbbbbbbbbbb
 7
rrbrbrb
 1
r
 2
bb
 18
rrrrrrrrrrrrrrrrrb
 8
rbbrbrbr
 1
b
 13
rbbbrbrrbrrbb
 100
brbbbrrrbbrbrbbrbbrbbbbrbbrrbbbrrbbbbrbrbbbbbbbbbbbbbbbbrrrrbbbbrrrbbbbbbbrbrrbrbbbbrrrbbbbrbbrbbbrb
 2
rb
 2
rr
 2
br

70
 1
 0
 1
 8
 1
 0
 3
 34
 0
 1
 0

#include <bits/stdc++.h>
using namespace std;
void __print(int x) { cerr << x; }
void __print(long x) { cerr << x; }
void __print(long long x) { cerr << x; }
void __print(unsigned x) { cerr << x; }
void __print(unsigned long x) { cerr << x; }
void __print(unsigned long long x) { cerr << x; }
void __print(float x) { cerr << x; }
void __print(double x) { cerr << x; }
void __print(long double x) { cerr << x; }
void __print(char x) { cerr << '\'' << x << '\''; }
void __print(const char *x) { cerr << '\"' << x << '\"'; }
void __print(const string &x) { cerr << '\"' << x << '\"'; }
void __print(bool x) { cerr << (x ? "true" : "false"); }
template <typename T, typename V>
void __print(const pair<T, V> &x) {
  cerr << '{';
  __print(x.first);
  cerr << ',';
  __print(x.second);
  cerr << '}';
}
template <typename T>
void __print(const T &x) {
  int f = 0;
  cerr << '{';
  for (auto &i : x) cerr << (f++ ? "," : ""), __print(i);
  cerr << "}";
}
void _print() { cerr << "]\n"; }
template <typename T, typename... V>
void _print(T t, V... v) {
  __print(t);
  if (sizeof...(v)) cerr << ", ";
  _print(v...);
}
void eff() {
  long long n;
  scanf("%lld", &n);
  string s;
  cin >> s;
  long long countForRed = 0, countForBlack = 0;
  if (n == 1) {
    printf("0\n");
    return;
  }
  for (long long i = 0; i < n; i += 2) {
    if (s[i] == 'b') {
      countForRed++;
    }
  }
  for (long long i = 1; i < n; i += 2) {
    if (s[i] == 'r') {
      countForBlack++;
    }
  }
  long long ans = (long long)1e9;
  long long ans1 = 0;
  ans1 += min(countForBlack, countForRed);
  ans1 += ((countForRed - ans1) + (countForBlack - ans1));
  ans = min(ans, ans1);
  countForRed = 0, countForBlack = 0;
  for (long long i = 0; i < n; i += 2) {
    if (s[i] == 'r') {
      countForBlack++;
    }
  }
  for (long long i = 1; i < n; i += 2) {
    if (s[i] == 'b') {
      countForRed++;
    }
  }
  long long ans2 = 0;
  ans2 += min(countForBlack, countForRed);
  ans2 += ((countForRed - ans2) + (countForBlack - ans2));
  ans = min(ans, ans2);
  cout << ans << endl;
}
int main() {
  eff();
  return 0;
}
