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

//package cf373;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;


public class cf2{
		public static void main(String[] args){
		 
		  
			BufferedReader br  = new BufferedReader(new InputStreamReader(System.in)) ; 
			try {
				int n = Integer.parseInt(br.readLine()) ; 
				char[] a =  br.readLine().toCharArray() ; 
				int oddb = 0   ;
				int oddr =  0 ;  
				int eveb = 0 ;  
				int ever = 0  ; 
				for (int i = 0 ;  i <  n  ; i++){
					if ((i&1)==1){
						if (a[i]-'b'==0){
							oddb++ ; 
						}else {
							oddr++ ;
						}
					}else {
						if (a[i]-'b'==0){
							eveb++ ;
						}else {
							ever++ ; 
						}
					}
					
				}
				int ans1 = Math.min(oddr, eveb)+ (oddr- Math.min(oddr, eveb))+ (eveb- Math.min(oddr, eveb)) ; 
				int ans2 = Math.min(oddb, ever)  + (oddb-Math.min(oddb, ever))+ (ever-Math.min(oddb, ever)) ; 
				System.out.println(Math.min(ans1, ans2));
 			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
			
	}
}



