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 AnatolyandCockroaches { 


public static void main(String[] args)
	{
		Scanner input = new Scanner(System.in); 
		int n = input.nextInt(); 
		String n_length = input.next();
		int red_misplaced = 0, black_misplaced = 0, result; 
	
		for (int i=0; i<n; i++)
		{
			if (i % 2 == 0 && n_length.charAt(i) == 'b')
				black_misplaced++; 
			
			else if (i % 2 == 1 && n_length.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 && n_length.charAt(i) == 'r')
				red_misplaced++; 
			
			else if (i % 2 == 1 && n_length.charAt(i) == 'b')
				black_misplaced++; 
		}
		
		result = Math.min(Math.max(red_misplaced, black_misplaced), result);
		
		System.out.print(result);
	}
}