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

public class Main {
    public static void main(String[] args){
        Scanner in =  new Scanner(System.in);
        int n = in.nextInt();
        String s = in.next();
        char[] c = s.toCharArray();

        /// first case if rbrbrb...
        int fcir, bt = 0, rt = 0;
        for(int i = 0; i < n; i++) {
            if(i % 2 == 0 && c[i] != 'r')
                rt++;
            else if(i % 2 == 1 && c[i] != 'b')
                bt++;
        }
        fcir = Math.max(bt, rt);

        ///second case if brbrbr...
        int fcib = 0;
        bt = rt = 0;
        for(int i = 0; i < n; i++) {
            if(i % 2 == 0 && c[i] != 'b')
                bt++;
            else if(i % 2 == 1 && c[i] != 'r')
                rt++;
        }
        fcib = Math.max(bt, rt);

        System.out.println(Math.min(fcib, fcir));
    }
}