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;
import java.util.StringTokenizer;

public class CF_373_B {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		int n = Integer.parseInt(br.readLine());
		// StringTokenizer st = new StringTokenizer(br.readLine());
		String s = br.readLine();
		int bcnt = 0, rcnt = 0;
		for (int i = 0; i < s.length(); i++) {
			if (s.charAt(i) == 'r')
				rcnt++;
			else {
				bcnt++;
			}
		}

		int colorable = rcnt > bcnt ? n / 2 - bcnt : n / 2 - rcnt;
		char col = ' ';
		if (rcnt > bcnt) {
			colorable = n / 2 - bcnt;
			col = 'b';
		} else {
			colorable = n / 2 - rcnt;
			col = 'r';
		}

		int colorReserves = colorable;
		int swapr = 0;
		int swapb = 0;
		
		// Begin r
		for (int i = 0; i < s.length(); i++) {
			if (i % 2 == 0 && s.charAt(i) != 'r') {
				if (col == 'r') {
					if (i == 0 && colorReserves > 0)
						colorReserves--;
					if (colorReserves < 0)
						swapr++;
				}else{
					swapr++;
				}
				
			}else if(i % 2 != 0 && s.charAt(i) != 'b'){
				if (col == 'b') {
					if (i == 0 && colorReserves > 0)
						colorReserves--;
					if (colorReserves < 0)
						swapr++;
				}else{
					swapr++;
				}
			}
		}
		// Begin b
		for (int i = 0; i < s.length(); i++) {
			if (i % 2 == 0 && s.charAt(i) != 'b') {
				if (col == 'r') {
					if (i == 0 && colorReserves > 0)
						colorReserves--;
					if (colorReserves < 0)
						swapb++;
				}else{
					swapb++;
				}
				
			}else if(i % 2 != 0 && s.charAt(i) != 'r'){
				if (col == 'b') {
					if (i == 0 && colorReserves > 0)
						colorReserves--;
					if (colorReserves < 0)
						swapb++;
				}else{
					swapb++;
				}
			}
		}
		
		
		int swap = Math.min(swapr, swapb);
		int sum = swap + colorable;
		System.out.println(sum);
	}
}
