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.lang.StringBuilder;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;

public class Main {
	
	public static void main(String[] args) throws IOException {
		BufferedReader x = new BufferedReader(new InputStreamReader(System.in));
		String xx = x.readLine();
		int n = Integer.parseInt(xx);
		char[] r = x.readLine().toCharArray();
		
		int evenB = 0;
		int evenR = 0;
		int oddB = 0;
		int oddR = 0;
		
		for(int i = 0; i < n; i++) {
			if (i % 2 == 0) {
				if (r[i] == 'r') {
					evenR++;
				} else {
					evenB++;
				}
			} else {
				if (r[i] == 'r') {
					oddR++;
				} else {
					oddB++;
				}
			}
		}
		
		int changesOddR = (oddB > evenR) ? oddB : evenR;
		int changesOddB = (oddR > evenB) ? oddR : evenB;
		int result = (changesOddB < changesOddR) ? changesOddB : changesOddR;
		System.out.println("" + result);
	}
}
