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;

public class B {
	public static void main(String [] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			
		int N = Integer.parseInt(br.readLine());
		
		String s = br.readLine();
		
		int [] oneMismatch = new int[2];
		int [] zeroMismatch = new int[2];
		
		for(int i=0; i<N; i++) {
			int num = 0;
			if(s.charAt(i) == 'r')
				num = 0;
			else
				num = 1;
			
			// 010101 colloring
			if(num != i % 2) {
				if(num == 0) {
					zeroMismatch[0]++;
				} else {
					oneMismatch[0]++;
				}
			}
			
			// 101010 colloring
			if(num  == i%2) {
				if(num == 0) {
					zeroMismatch[1]++;
				} else {
					oneMismatch[1]++;
				}
			}
			
		}
		
		System.out.println(Math.min(Math.max(oneMismatch[0],zeroMismatch[0]), Math.max(oneMismatch[1], zeroMismatch[1]) ));
	
		
	}

}