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.util.*;

public class B719 {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);

		int n = scan.nextInt();
		String str = scan.next();
		
		int oddRed = 0;
		int evenRed = 0;
		int oddBlack = 0;
		int evenBlack = 0;
		
		for (int i = 1; i <= n; i++) {
			if (str.charAt(i - 1) == 'r') {
				if (i % 2 == 1) {
					oddRed++;
				}
				else {
					evenRed++;
				}
			}
			else {
				if (i % 2 == 1) {
					oddBlack++;
				}
				else {
					evenBlack++;
				}
			}
		}
		
		System.out.print(oddRed + evenRed > oddBlack + evenBlack ? 
				Math.max(evenRed, oddBlack) : Math.max(oddRed, evenBlack));
	}
}