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;

/**
 * Sep 23, 2016 | 3:24:08 PM
 * <pre>
 * <u>Description</u>
 *
 * </pre>
 *
 * @author Essiennta Emmanuel (colourfulemmanuel@gmail.com)
 */
public class ProblemB {
    
    int solve(char[] a) {
        int[] bar1 = {0, 0}, bar2 = {0, 0};
        char[] foo = {'r', 'b'};
        for (int i = 0, who = 0; i < a.length; i++, who ^= 1) {
            if (a[i] != foo[who]) {
                bar1[who]++;
            } else {
                bar2[who]++;
            }
        }
        return Math.min(Math.min(bar1[0], bar1[1]) + Math.abs(bar1[0] - bar1[1]), Math.min(bar2[0], bar2[1]) + Math.abs(bar2[0] - bar2[1]));
    }
    
    public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in)) {
            sc.next();
            char[] a = sc.next().toCharArray();
            System.out.println(new ProblemB().solve(a));
        }
    }
}
