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 Main {
	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		
		int count1 = 0;
		int count2 = 0;
		int max1;
		int max2;
		
		int n = sc.nextInt();
		String str = sc.next();

		// brbr.
		for (int i = 0; i < n; i += 2) {
			if (str.charAt(i) != 'b')
				count1++;
		}
		for (int i = 1; i < n; i += 2) {
			if (str.charAt(i) != 'r')
				count2++;
		}
		if (count1 >= count2)
			max1 = count1;
		else
			max1 = count2;

		count1 = 0;
		count2 = 0;
		// rbrb...
		for (int i = 0; i < n; i += 2) {
			if (str.charAt(i) != 'r')
				count1++;
		}
		for (int i = 1; i < n; i += 2) {
			if (str.charAt(i) != 'b')
				count2++;
		}
		if (count1 >= count2)
			max2 = count1;
		else
			max2 = count2;

		if (max1 > max2)
			System.out.println(max2);
		else
			System.out.println(max1);

		sc.close();
	}
}