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


import java.util.ArrayList;
import java.util.Scanner;

public class Main13 {



    public static void main(String[] args)  {
       Scanner scanner = new Scanner(System.in);
       int n = scanner.nextInt(), res1 = 0, res2 = 0;
       String s = scanner.next();
       char var1;
        char var2;
        int countR1 = 0, countR2 = 0;
        int countB1 = 0, countB2 = 0;
        for (int i = 0; i < n; i++) {
            if (i%2 ==0)var1 = 'r';
            else var1 = 'b';
            if (var1 != s.charAt(i)) {
                if (s.charAt(i) == 'b')countB1++;
                else countR1++;
            }

            if (i%2 ==0)var2 = 'b';
            else var2 = 'r';
            if (var2 != s.charAt(i)) {
                if (s.charAt(i) == 'b')countB2++;
                else countR2++;
            }

        }
       if (countB1 >= countR1) res1 = countR1+(countB1-countR1);
       else res1 = countR1+(countB1-countR1);

        if (countB2 >= countR2) res2 = countR2+(countB2-countR2);
        else res2 = countR2+(countB2-countR2);





        System.out.println(Math.min(res1, res2));





    }
}
