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 FastIO() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.precision(20);
}
long long max(long long a, long long b) {
  if (a > b)
    return a;
  else
    return b;
}
long long min(long long a, long long b) {
  if (a < b)
    return a;
  else
    return b;
}
long long pow(long long B, long long P) {
  long long S = 1;
  for (long long i = 1; i <= P; i++) S = S * B;
  return S;
}
int fx4[] = {1, -1, 0, 0};
int fy4[] = {0, 0, 1, -1};
string make(int N, char C) {
  string S;
  S += C;
  for (int i = 1; i < N; i++) {
    if (S[i - 1] == 'r')
      S += 'b';
    else
      S += 'r';
  }
  return S;
}
int check(string S, string S1, int N) {
  int R = 0, B = 0;
  for (int i = 0; i < N; i++) {
    if (S[i] != S1[i]) {
      if (S1[i] == 'r')
        R++;
      else
        B++;
    }
  }
  return max(R, B);
}
int main() {
  FastIO();
  int N;
  string S;
  cin >> N;
  cin >> S;
  string S1 = make(N, 'r');
  string S2 = make(N, 'b');
  int X = check(S, S1, N);
  int Y = check(S, S2, N);
  cout << min(X, Y) << endl;
  return 0;
}
