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 CF_373_B {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		br.readLine();
		String s = br.readLine();
		int b1 = 0, b2 = 0, r1 = 0, r2 = 0;
		int pos = 0;// 1 ~~> b,2~~> r
		for (char c : s.toCharArray()) {
			
			if (c == 'b') {
				if (pos % 2 == 1) {
					b1++;
				} else {
					b2++;
				}
			} else {
				if (pos % 2 == 0) {
					r1++;
				} else {
					r2++;
				}
			}
			pos++;
		}
	
		
		System.out.println(Math.min(Math.max(b1, r1), Math.max(r2, b2)));

	}

}
