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.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class problem1 {

	public static void main(String[]args) throws NumberFormatException, IOException {
		BufferedReader x = new BufferedReader(new InputStreamReader(System.in));
		int size = Integer.parseInt(x.readLine());
		String s = x.readLine();
		char t1 = 'r';
		char t2 = 'b';
		int rs1 = 0;
		int rs2 = 0;
		int bs1 = 0;
		int bs2 = 0;
		for(int i=0;i<s.length();i++) {
			char a = s.charAt(i);
			if(a != t1) {
				if(t1 == 'r')	
					bs1++;
				else rs1++;
			}
			if(a != t2) {
				if(t1 == 'r')	
					bs2++;
				else rs2++;
			}
			if(t1 == 'r')
				t1 = 'b';
			else t1 = 'r';
			if(t2 == 'r')
				t2 = 'b';
			else t2 = 'r';
		}
		int max1 = rs1;
		if(bs1>rs1)
			max1 = bs1;
		int max2 = rs2;
		if(bs2>rs2)
			max2 = bs2;
		if(max1<max2)
			System.out.println(max1);
		else System.out.println(max2);
	}	
}
