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

public class B373 {

	static char ar[];
	static boolean last = false;
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt(); sc.nextLine();
		String str = sc.nextLine();
		ar = str.toCharArray();
		
		int rCount=0, bCount=0,rStart,bStart;
		
		//If starts with Red
		for(int i=0;i<n;i++){
			if(i%2==0 && ar[i]=='b'){
				bCount++;
			}else if(i%2==1 && ar[i]=='r'){
				rCount++;
			}
		}
		rStart = Math.max(rCount, bCount);
		
		//If starts with Black
		rCount=0;bCount=0;
		for(int i=0;i<n;i++){
			if(i%2==0 && ar[i]=='r'){
				rCount++;
			}else if(i%2==1 && ar[i]=='b'){
				bCount++;
			}
		}
		bStart = Math.max(rCount, bCount);
		
		int result = Math.min(rStart, bStart);
				
		System.out.println(result);
		
	}

}
