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 B {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int n = scanner.nextInt();

        String row = scanner.next();

        Character pre = null;
        int counter = 0, ii = 0;
        char[] chars = {'r', 'b'};
        int[][] val = {{0, 0}, {0, 0}};

        char[] charArray = row.toCharArray();

        for (char aCharArray : charArray) {
            if (aCharArray != chars[ii])
                val[0][ii]++;
            if (aCharArray != chars[1 - ii])
                val[1][1 - ii]++;
            ii = (ii + 1) % 2;
        }

        System.out.println(Math.min(Math.max(val[0][0], val[0][1]), Math.max(val[1][0], val[1][1])));

    }
}
