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.InputStreamReader;

public class ProblemB {
	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		String cocks = br.readLine();
		
		int res = 100000;
		
		// start with 'b'
		int bCnt = 0;
		int rCnt = 0;
		for (int i=0; i<n; i+=2) {
			if (cocks.charAt(i) != 'b') {
				bCnt++;
			}
		}
		for (int i=1; i<n; i+=2) {
			if (cocks.charAt(i) != 'r') {
				rCnt++;
			}
		}
		int temp = Math.max(bCnt, rCnt);
		if (temp < res) {
			res = temp;
		}
		
		// start with 'r'
		bCnt = 0;
		rCnt = 0;
		for (int i=1; i<n; i+=2) {
			if (cocks.charAt(i) != 'b') {
				bCnt++;
			}
		}
		for (int i=0; i<n; i+=2) {
			if (cocks.charAt(i) != 'r') {
				rCnt++;
			}
		}
		temp = Math.max(bCnt, rCnt);
		if (temp < res) {
			res = temp;
		}
		
		System.out.println(res);
	}
}
