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 in = new Scanner(System.in);
		int n = in.nextInt();
		String string = in.next();
		char[] s = string.toCharArray();
		int a1 = answer('b', 'r', s);
		int a2 = answer('r', 'b', s);
		System.out.println(Math.min(a1, a2));
		in.close();
	}
	private static int answer (char black, char red, char[] s) {
		int answer = 0;
		int b = 0; int r = 0;
		int bwp = 0; int rwp = 0;
		for (int i = 0; i < s.length; i++) {
			if (s[i]==black) {
				b++;
			} else {
				r++;
			}
			char c = (i%2==0)?black:red;
			if (s[i]!=c){
				if (s[i]==black) {
					bwp++;
				} else {
					rwp++;
				}
			}
		}
		if (r < s.length/2) {
			answer = s.length/2 - r + rwp;
		} else {
			answer = r - s.length/2 + bwp;
		}
		return answer;
	}

}
