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.IOException;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;

public class Main {
	static Scanner sc = new Scanner(System.in);
	static PrintWriter pw = new PrintWriter(System.out);
	
	public static void main(String[] args) throws IOException {
		// -------------------- Main ------------------
		long n = sc.nextInt() ; 
		String s = sc.next() ; 
		long o1red = 0 , o1blue = 0 ,  o2red  = 0 , o2blue = 0 ;
		boolean turn = false ;
		for(int i = 0 ; i < n ; i ++){
			char x = s.charAt(i) ;
			if(turn){
				if(x=='r'){
					o2blue++ ;
				}
				else o1red++ ; //
			}else{
				if(x=='r')o1blue++; //
				else o2red++ ;
			}
			turn=!turn;
		}
		long max1 = Math.max(o1blue, o1red)  , max2 = Math.max(o2blue, o2red) ;
		pw.println(Math.min(max1, max2));
		pw.flush();
		pw.close();
		// ---------------------------------------------

	}

}
