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.Scanner;

public class Main{

    public static void main(String[] args) {

        Scanner in = new Scanner(System.in);

        boolean roachLine[] = new boolean[in.nextInt()];

        String roachLineStr = in.next();
        
        int rounds = 0;

        int redBufferF = 0;
        int blackBufferF = 0;

        int redBufferT = 0;
        int blackBufferT = 0;

        for (int i = 0; i < roachLineStr.length(); i++) {
            roachLine[i] = roachLineStr.charAt(i) == 'b';

            if(true){
                if(roachLine[i] != (i % 2 == 0))
                {
                    if(roachLine[i])
                        blackBufferT++;
                    else
                        redBufferT++;
                }else if(roachLine[i] != (i % 2 == 1)){
                    if(!roachLine[i])
                        blackBufferF++;
                    else
                        redBufferF++;
                }
            }
        }

        int roundsF = Math.min(blackBufferF, redBufferF);
        int roundsT = Math.min(blackBufferT, redBufferT);

        roundsF += blackBufferF - Math.min(blackBufferF, redBufferF);
        roundsF += redBufferF - Math.min(blackBufferF, redBufferF);


        roundsT += blackBufferT - Math.min(blackBufferT, redBufferT);
        roundsT += redBufferT - Math.min(blackBufferT, redBufferT);

        rounds = Math.min(roundsF, roundsT);

        System.out.println(rounds);



    }

}