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) {
        try (Scanner in = new Scanner(System.in)){
            int N = in.nextInt();
            String text = in.next();

            int redEven = 0, redOdd = 0;
            int blackEven = 0, blackOdd = 0;

            for (int i = 0; i < N; i++) {
                if (i % 2 == 0){
                    if (text.charAt(i) == 'r')
                        redEven++;
                    else
                        blackEven++;
                }
                else{
                    if (text.charAt(i) == 'r')
                        redOdd++;
                    else
                        blackOdd++;
                }
            }

            System.out.println(Math.min(Math.max(redEven, blackOdd), Math.max(redOdd, blackEven)));
        }
    }
}
