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

/* IMPORTANT: Multiple classes and nested static classes are supported */

//imports for BufferedReader
import java.io.BufferedReader;
import java.io.InputStreamReader;

//import for Scanner and other utility classes
import java.util.*;
import java.io.*;

public class testClass9 {


    public static void main(String args[] ) throws IOException {
		
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();
		String str = s.next();
		
		char[] charArr = str.toCharArray();
		int count = 0;
		int r = 0;
		int b = 0;
		int odd = 0;
		int even = 0;
		for(int i = 0; i < n; i++){
			if(charArr[i] == 'r'){
				r++;
				
				if((i+1)%2 == 1)
					odd++;
				else
					even++;
			}
			else{
				b++;
				
				if((i+1)%2 == 1)
					odd--;
				else
					even--;
			}
		}
		//cool
		int OPblue = 0;
		int OPred = 0;
		if((odd > 0) || (odd == 0 && even < 0) || (odd > even)){
			// Red first
			for(int i = 0; i < n; i++){
				if((i+1)%2 == 1){
					if(charArr[i] == 'b'){
						OPblue++;
					}
				}
				else{
					if(charArr[i] == 'r'){
						OPred++;
					}
				}
			}
		}
		else{
			
			// Black first
			for(int i = 0; i < n; i++){
				if((i+1)%2 == 1){
					if(charArr[i] == 'r'){
						OPred++;
					}
				}
				else{
					if(charArr[i] == 'b'){
						OPblue++;
					}
				}
			}
		}

		if(OPred > OPblue)
			count = OPred;
		else
			count = OPblue;
		System.out.println(count);
	}
}
