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.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.StringTokenizer;


public class Solution {

	public static void main(String[] args) throws NumberFormatException, IOException {
		// TODO Auto-generated method stub
		
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
		StringTokenizer st;
		
		int n = Integer.parseInt(br.readLine());
		
		String line = br.readLine();
		char [] cockroaches = line.toCharArray();
		char [] cockroaches1 = line.toCharArray();
		int counter = 0;
		int counter1 = 0;
		
		int flagB1 = -1;
		int flagR1 = -1;
		int flagB2 = -1;
		int flagR2 = -1;
		
		
		for(int i=0;i<n;i++){
			//b-0 r-1
			if(cockroaches[i] == 'r' && i%2==0){
				
				if(i > flagB1)
				for(int j=i+1;j<n;j++){
					if(cockroaches[j] == 'b' && j%2==1){
						char t = cockroaches[i];
						cockroaches[i] = cockroaches[j];
						cockroaches[j] = t;
						flagB1 = j;
					}
				}
				counter++;
			}else
			if(cockroaches[i] == 'b' && i%2==1){
				if(i > flagR1)
				for(int j=i+1;j<n;j++){
					if(cockroaches[j] == 'r' && j%2==0){
						char t = cockroaches[i];
						cockroaches[i] = cockroaches[j];
						cockroaches[j] = t;
						flagR1 = j;
					}
				}
				counter++;
			}
			
			//b-1 r-0
			if(cockroaches1[i] == 'r' && i%2==1){
				if(i > flagB2)
				for(int j=i+1;j<n;j++){
					if(cockroaches1[j] == 'b' && j%2==0){
						char t = cockroaches1[i];
						cockroaches1[i] = cockroaches1[j];
						cockroaches1[j] = t;
						flagB2 = j;
					}
				}
				counter1++;
			}else
			if(cockroaches1[i] == 'b' && i%2==0){
				if(i > flagR2)
				for(int j=i+1;j<n;j++){
					if(cockroaches1[j] == 'r' && j%2==1){
						char t = cockroaches1[i];
						cockroaches1[i] = cockroaches1[j];
						cockroaches1[j] = t;
						flagR2 = j;
					}
				}
				counter1++;
			}
		}
		
		System.out.println(Math.min(counter1, counter));
	}
}
