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;
using ll = long long;
using ld = long double;
using vi = vector<int>;
constexpr int INF = numeric_limits<int>::max() - 1;
constexpr ll LINF = numeric_limits<ll>::max() - 1;
constexpr ld EPS = numeric_limits<ld>::epsilon();
int n;
string s;
void input() { cin >> n >> s; }
int f1() {
  int badr = 0, badb = 0;
  for (int i = 0; i < n; i += 2) badr += s[i] == 'r';
  for (int i = 1; i < n; i += 2) badb += s[i] == 'b';
  return max(badr, badb);
}
int f2() {
  int badr = 0, badb = 0;
  for (int i = 1; i < n; i += 2) badr += s[i] == 'r';
  for (int i = 0; i < n; i += 2) badb += s[i] == 'b';
  return max(badr, badb);
}
void solve() { cout << min(f1(), f2()) << '\n'; }
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.precision(16);
  cout << fixed;
  int _times = 1;
  while (_times--) {
    input();
    solve();
  }
}
