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 printVector(vector<int> v) {
  for_each(v.begin(), v.end(), [](int i) { std::cout << i << " "; });
  cout << '\n';
}
struct myclass {
  void operator()(int i) { std::cout << ' ' << i; }
} myobject;
int main() {
  ios_base::sync_with_stdio(false);
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int cSize;
  cin >> cSize;
  string cockroach;
  cin >> cockroach;
  bool flag;
  int red = 0, black = 0;
  int firstAnswer;
  int secondAnswer;
  for (int i = 0; i < cSize; i++) {
    if (i % 2 == 0) {
      if (cockroach[i] != 'r') black++;
    } else if (cockroach[i] != 'b')
      red++;
  }
  int swaps = min(red, black);
  int recolor = max(red, black) - swaps;
  firstAnswer = recolor + swaps;
  red = 0, black = 0;
  for (int i = 0; i < cSize; i++) {
    if (i % 2 == 0) {
      if (cockroach[i] != 'b') red++;
    } else if (cockroach[i] != 'r')
      black++;
  }
  swaps = min(red, black);
  recolor = max(red, black) - swaps;
  secondAnswer = swaps + recolor;
  cout << (min(firstAnswer, secondAnswer));
  return 0;
}
