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

/**
 * This method outputs an integer which denotes the number of turns Anatoly has to perform
 * in order to make the colors of cockroaches
 *
 *
 * @author 
 * @version 1.00 2016/11/2
 */

public class AnatolyAndCockroaches {
	
    public static void main(String[] args) {
      
		
		Scanner scan = new Scanner(System.in);
		
		int n = scan.nextInt();
		String array = scan.next();
		
		System.out.print(minColorChange(n,array));
	}
	public static int minColorChange (int n, String array){
		
		int red_misplaced = 0, black_misplaced = 0, result; 
	
		for (int i=0; i<n; i++){
			if (i % 2 == 0 && array.charAt(i) == 'b')
				black_misplaced++; 
			
			else if (i % 2 == 1 && array.charAt(i) == 'r')
				red_misplaced++; 
		}
		
		result = Math.max(red_misplaced, black_misplaced);
		
		red_misplaced = 0; 
		black_misplaced = 0; 
		
		for (int i=0; i<n; i++){
			if (i % 2 == 0 && array.charAt(i) == 'r')
				red_misplaced++; 
			
			else if (i % 2 == 1 && array.charAt(i) == 'b')
				black_misplaced++; 
		}
		
		result = Math.min(Math.max(red_misplaced, black_misplaced), result);
		
		return result;
	}
}
