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;
long long int max(long long int a, long long int b) { return a > b ? a : b; }
long long int min(long long int a, long long int b) {
  return a + b - max(a, b);
}
int arr[101];
int main() {
  cin.sync_with_stdio(false);
  int i, j, n, b = 0, r = 0;
  string str;
  cin >> n;
  cin >> str;
  for (i = 0; i < str.size(); i++)
    if (str[i] == 'b')
      b++;
    else
      r++;
  int ans = INT_MAX;
  int misPlacedB = 0, misPlacedR = 0;
  for (i = 0; i < str.size(); i++) {
    if (i % 2 == 0) {
      if (str[i] == 'r') {
        continue;
      }
      misPlacedR++;
    } else {
      if (str[i] == 'b') {
        continue;
      }
      misPlacedB++;
    }
  }
  int here;
  here = abs(misPlacedB - misPlacedR);
  ans = min(ans, min(misPlacedB, misPlacedR) + here);
  misPlacedR = misPlacedB = 0;
  for (i = 0; i < str.size(); i++) {
    if (i % 2 == 1) {
      if (str[i] == 'r') {
        continue;
      }
      misPlacedR++;
    } else {
      if (str[i] == 'b') {
        continue;
      }
      misPlacedB++;
    }
  }
  here = abs(misPlacedB - misPlacedR);
  ans = min(ans, min(misPlacedB, misPlacedR) + here);
  cout << ans;
  return 0;
}
