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;

/**
 *
 * @author aboragab
 */
public class B_AnatolyAndCockroaches {

    /**
     * @param args the command line arguments
     */
    static char[] arr;
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        in.nextLine();
        arr = in.nextLine().toCharArray();
        
        System.out.println(Math.min(solve('r'), solve('b')));

    }
    
    public static int solve(char start){
        int countR = 0, countB = 0;
        for (int i = 0; i < arr.length; i++) {
            char c;
            if (i % 2 == 0) {
                // same
                c = start;
                if(arr[i] != c){
                    if(c == 'r') countR++;
                    if(c == 'b') countB++;
                }
            } else {
                c = (start == 'r' ? 'b' : 'r');
                if(arr[i] != c){
                    if(c == 'r') countR++;
                    if(c == 'b') countB++;
                }
            }
        }
       return (int) Math.max(countB, countR);
    }

}
