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.*;
import java.io.*;
public class Anatoly_and_Cockroaches
{
	public static void main(String args[]) throws Exception
	{
		BufferedReader f=new BufferedReader(new InputStreamReader(System.in));
		char[] arr=new char[]{'r','b'};
		int runs=Integer.parseInt(f.readLine());
		int[] num=new int[2];
		String in=f.readLine();
		for(int x=0;x<runs;x++)
			if(in.charAt(x)!=arr[x%2])
				num[x%2]++;
		int min=Math.max(num[0],num[1]);
		num=new int[2];
		for(int x=0;x<runs;x++)
			if(in.charAt(x)!=arr[(x+1)%2])
				num[(x+1)%2]++;
		System.out.println(Math.min(min,Math.max(num[0],num[1])));
	}
}