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

// CodeForces Round 373 -- slowe

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class B373 {
	
	public static void main(String[] args) throws Exception {
		FastScanner in = new FastScanner();
		
		int n = in.nextInt();
		char[] s = in.next().toCharArray();
		
		int rb = 0, br = 0, ans = 0;
		for(int i = 0; i < n; i++) {
			if(i%2 == 0 && s[i] == 'r')
				rb++;
			if(i%2 == 1 && s[i] == 'b')
				br++;
		}
		ans = rb > br ? rb : br;
		
		rb = br = 0;
		for(int i = 0; i < n; i++) {
			if(i%2 == 1 && s[i] == 'r')
				rb++;
			if(i%2 == 0 && s[i] == 'b')
				br++;
		}
		
		int back = rb > br ? rb : br;
		
		System.out.println(Math.min(back, ans));
	}
	
	static class FastScanner {
		BufferedReader br;
		StringTokenizer st;
		public FastScanner() {
			br = new BufferedReader(new InputStreamReader(System.in));
			st = new StringTokenizer("");
		}
		
		String next() throws Exception {
			while(!st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}
		
		int nextInt() throws Exception {
			return Integer.parseInt(next());
		}
	}
}
