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

/**
 * Created by kotori on 16/9/29.
 */
import java.util.*;

public class B {
    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        String str = in.next();
        int planBR = 0, planRB = 0;
        int misRinBR = 0, misBinBR = 0;
        int misRinRB = 0, misBinRB = 0;
        for (int i = 0; i < n; i++) {
            // planBR
            if(str.charAt(i)=='r' && i%2==0){
                misRinBR = misRinBR + 1;
            }
            if(str.charAt(i)=='b' && i%2==1){
                misBinBR = misBinBR + 1;
            }
            //planRB
            if(str.charAt(i)=='r' && i%2==1){
                misRinRB = misRinRB + 1;
            }
            if(str.charAt(i)=='b' && i%2==0){
                misBinRB = misBinRB + 1;
            }
        }
        planBR = Math.max(misRinBR, misBinBR);
        planRB = Math.max(misRinRB, misBinRB);
        System.out.println(Math.min(planBR, planRB));
        in.close();
    }
}
