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

//package round373;

import java.util.Scanner;

/**
 * Created by leelddd on 9/23/2016.
 */
public class B_AnatolyAndCockroaches {

    public static void main (String[] args) {
        Scanner in = new Scanner(System.in);
        int num = Integer.parseInt(in.nextLine());
        String line = in.nextLine();

        int checkR = change(num, line.toCharArray(), 'r', 'b');
        int checkB = change(num, line.toCharArray(), 'b', 'r');
        if (checkB > checkR) System.out.println(checkR);
        else System.out.println(checkB);
    }

    public static int change (int num, char[] line, char begin, char next) {
        int count = 0;
        for (int i = 0; i < num - 1; i++) {
            if (i % 2 == 0) {
                if (line[i] == next && line[i + 1] == begin) {
                    line[i] = begin;
                    line[i + 1] = next;
                    count++;
                }
            } else {
                if (line[i] == begin && line[i + 1] == next) {
                    line[i] = next;
                    line[i + 1] = begin;
                    count++;
                }
            }
        }
        for (int i = 0; i < num; i++) {
            if (i % 2 == 0) {
                if (line[i] == next) {
                    line[i] = begin;
                    count++;
                }
            } else {
                if (line[i] == begin) {
                    line[i] = next;
                    count++;
                }
            }
        }
        return count;
    }

}