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.ByteArrayInputStream;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.util.Scanner;

public class B719 {
	public static void testSet() throws UnsupportedEncodingException {
		String data = "13\r\n" + 
				"rbbbrbrrbrrbb";
		InputStream testInput = new ByteArrayInputStream(data.getBytes("UTF-8"));
		System.setIn(testInput);
	}

	public static void main(String[] args) throws UnsupportedEncodingException {
		//testSet();
		Scanner sc = new Scanner(System.in);
		sc.nextInt();
		String input = sc.next();
		int b_off_1 = 0;
		int r_off_1 = 0;
		int b_off_2 = 0;
		int r_off_2 = 0;
		
		for (int i = 0; i < input.length(); i++) {
			char c = input.charAt(i);
			if (i % 2 == 0) {
				if (c == 'b') {
					b_off_2++;
				} else {
					r_off_1++;
				}
			} else {
				if (c == 'b')
					b_off_1++;
				else
					r_off_2++;
			}
		}
		
		System.out.println(Math.min(Math.max(b_off_2, r_off_2),Math.max(b_off_1, r_off_1)));
		
	}
}
