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

public class Solution {


	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt(); in.nextLine();
		char[] roaches = in.nextLine().toCharArray();
		int[] counts1 = new int[255];
		int[] counts2 = new int[255];
		char current = 'b';
		char next = 'r';
		for (int c=0 ; c<n ; c++) {
			if (roaches[c] != current) counts1[current]++;
			if (roaches[c] != next) counts2[next]++;
			char temp = current;
			current = next;
			next = temp;
		}
		current = 'b'; next = 'r';
		int min = Integer.MAX_VALUE;
		
		int larger = Math.max(counts1[current], counts1[next]);
		int smaller =  counts1[current] + counts1[next] - larger;
		int diff = larger - smaller;
		min = Math.min(smaller+diff, min);
		char temp = current;
		current = next;
		next = temp;
		
		larger = Math.max(counts2[current], counts2[next]);
		smaller =  counts2[current] + counts2[next] - larger;
		diff = larger - smaller;
		min = Math.min(smaller+diff, min);
		temp = current;
		current = next;
		next = temp;
		
		System.out.println(min);
	}
  
}