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


public class bucky{


private int suma;

public static void main (String args[]) {

Scanner input=new Scanner(System.in);

HashMap<String, String> map1= new HashMap<String, String>();
HashMap<Integer, Integer> map2= new HashMap<Integer, Integer>();
HashMap<String, Integer> scazut= new HashMap<String, Integer>();
HashMap<Integer, Integer> linieright= new HashMap<Integer, Integer>();

			
		
			int n=input.nextInt();
			String str=input.next();
			
			
			int x1=0;
			int y1=0;
			
			int result1=0;
			
			for(int i=0;i<n;i++)
			if(i%2==0 && str.charAt(i)!='r') x1++;
			else if(i%2==1 && str.charAt(i)!='b') y1++;
			
			
			result1=Math.max(x1,y1);
			
			
			int x2=0;
			int y2=0;
			
			int result2=0;
			
			for(int i=0;i<n;i++)
			if(i%2==0 && str.charAt(i)!='b') x2++;
			else if(i%2==1 && str.charAt(i)!='r') y2++;
			
			
			result2=Math.max(x2,y2);
			
			
		int result3= Math.min(result1,result2);
		
		System.out.println(result3);
			
			

}
	
	
	
	
	
	
	
	
	
	
	
	
			
			
			}