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;
int func1(string input) {
  char c = 'r';
  int rr = 0, rb = 0, br = 0, bb = 0;
  for (int i = 0; i < input.length(); i++) {
    if (input[i] == 'r' && c == 'r')
      rr++;
    else if (input[i] == 'r' && c == 'b')
      rb++;
    else if (input[i] == 'b' && c == 'r')
      br++;
    else if (input[i] == 'b' && c == 'b')
      bb++;
    if (c == 'r')
      c = 'b';
    else
      c = 'r';
  }
  return max(rb, br);
}
int func2(string input) {
  char c = 'b';
  int rr = 0, rb = 0, br = 0, bb = 0;
  for (int i = 0; i < input.length(); i++) {
    if (input[i] == 'r' && c == 'r')
      rr++;
    else if (input[i] == 'r' && c == 'b')
      rb++;
    else if (input[i] == 'b' && c == 'r')
      br++;
    else if (input[i] == 'b' && c == 'b')
      bb++;
    if (c == 'r')
      c = 'b';
    else
      c = 'r';
  }
  return max(rb, br);
}
int main() {
  int len;
  string input;
  cin >> len >> input;
  cout << min(func1(input), func2(input)) << endl;
}
