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 sc = new Scanner(System.in);
        int n = sc.nextInt();
        String str = sc.next();

        int rEven = 0;
        int rOdd = 0;
        int bEven = 0;
        int bOdd = 0;
        for (int i = 0; i < n; i++) {
            char color = str.charAt(i);
            if(color == 'r'){
                rEven += Math.abs(i % 2 - 1);
                rOdd += i % 2;
            } else {
                bEven += Math.abs(i % 2 - 1);
                bOdd += i % 2;
            }
        }

        int result = 0;
//        p("rEven " + rEven + " bOdd " + bOdd + " bEven " + bEven + " rOdd " + rOdd);
        if(rEven + bOdd > rOdd + bEven){
            result += Math.min(rOdd, bEven) + Math.abs(rOdd - bEven);
        } else {
            result += Math.min(rEven, bOdd) + Math.abs(rEven - bOdd);
        }

        p(result);
    }

    public static void p(Object obj) {
        System.out.println(obj);
    }
}
