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.io.PrintWriter;
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        int n = in.nextInt();
        in.nextLine();
        String tarakans = in.nextLine();
        char r = 'r';
        char b = 'b';

        int fx = 0;
        int fy = 0;
        int sx = 0;
        int sy = 0;

        for (int i = 0; i < n; i++) {
            char curr = tarakans.charAt(i);
            if (i % 2 == 0) {
                if (curr != r) fx++;
            } else {
                if (curr != b) fy++;
            }

            if (i % 2 != 0) {
                if (curr != r) sx++;
            } else {
                if (curr != b) sy++;
            }
        }

        out.print(Math.min(Math.max(fx,fy),Math.max(sx,sy)));

        out.flush();
    }

}
