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.lang.reflect.Array;
import java.util.ArrayList;
import java.util.Scanner;
import static java.lang.Math.*;

public class Main {
    public static int get(String a, char b) {
        int c[] = new int[2];

        for(int i = 0; i < a.length(); i++)
            if((a.charAt(i) == b) != (i % 2 == 1))
                c[(a.charAt(i) == b)? 1 : 0]++;

        return max(c[0], c[1]);
    }

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

        int n = in.nextInt();
        String a = new String(in.next());

        System.out.println(min(get(a, 'r'), get(a, 'b')));
    }
}
