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.InputStreamReader;

public class CF_719B_AnatolyAndCockroaches {
	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		boolean[] taken = new boolean[n];
		char[] arr = br.readLine().toCharArray();
		int RedFirst = 0;
		int BlackFirst = 0;
		for (int i = 0; i < n; i++) {
			if (i % 2 == 0 && arr[i] == 'b') {
			BlackFirst++;
			
			}
			if (i % 2 == 0 && arr[i] == 'r') {
				RedFirst++;
				
				}
		}
		char EvenChar = 'x';
		char OddChar = 'x';
		//System.out.println("Black first is : " + BlackFirst+" RedFirst Is :" + RedFirst);
		if(BlackFirst>=RedFirst){
			EvenChar = 'b';
			OddChar='r';
		}else{
			EvenChar='r';
			OddChar='b';
		}
		//System.out.println("Even Char is " + EvenChar);
		//System.out.println("Odd Char is  " + OddChar);
		int redChange = 0;
		int blackChange = 0;
for(int i=0;i<n;i++){
	if(i%2==0&&arr[i]!=EvenChar){
		if(arr[i]=='b')
			blackChange++;
		else
			redChange++;
	}
	if(i%2==1&&arr[i]!=OddChar){
		if(arr[i]=='b')
			blackChange++;
		else
			redChange++;
	}
}
System.out.println(Math.max(redChange, blackChange));
	}
}
