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.*;
import java.util.*;

public class R373B {
	public static void main(String[] args) throws Exception {
		BufferedReader f = new BufferedReader(new InputStreamReader(System.in));
		Scanner s = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		
		int n = Integer.parseInt(f.readLine());
		char[] a = f.readLine().toCharArray();
		char[] good = new char[n];
		char now = a[0] == 'r' ? 'r' : 'b'; 
		for(int i = 0; i <n; i++) {
			good[i] = now;
			if(now == 'r') now = 'b';
			else now = 'r';
		}
		int rDiff = 0, bDiff = 0;
		for(int i = 0; i < n; i++) {
			if(good[i] != a[i]) {
				if(a[i] == 'b') bDiff++;
				else rDiff++;
			}
		}
		if(rDiff == bDiff) System.out.println(rDiff);
		else {
			int ans = Math.min(rDiff, bDiff);
			ans += Math.abs(rDiff - bDiff);
			System.out.println(ans);
		}
	}
}