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.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;

public class Rank{

	
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int n=sc.nextInt();
		String str=sc.next();
		System.out.println(minMove(str));
		
	}
	public static int minMove(String str){
		
		StringBuilder sb=new StringBuilder();
		char ch=str.charAt(0);
		int n=str.length();
		for(int i=0;i<n;i++){
			if(i%2==0){
				if(str.charAt(i)!=ch){
					sb.append(str.charAt(i));
				}
			}
			else{
				if(str.charAt(i)==ch){
					sb.append(ch);
				}
			}
		}
		int countb=0;
		int countr=0;
		for(int i=0;i<sb.length();i++){
			if(sb.charAt(i)=='r'){
				countr++;
			}else countb++;
		}
		
		int max=Math.max(countr, countb);
		return max;
		
		
		
		

	}



	


}
