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

//package AIM_contest;
import java.io.*;
import java.util.*;

public class Main {

	public static void main(String[] args)throws Exception {
		// TODO Auto-generated method stub\
		BufferedReader sc = new BufferedReader(new InputStreamReader(System.in));
		int t = Integer.parseInt(sc.readLine());
		String s = sc.readLine();
		int b1=0,b2=0,r1=0,r2=0;
		for(int i=0;i<t;i++)
		{
			if(i%2==0)
			{
				if(s.charAt(i)=='b')
				{
					b2++;
				}
				else
				{
					r1++;
				}
			}
			else
			{
				if(s.charAt(i)=='b')
				{
					b1++;
				}
				else
				{
					r2++;
				}
				
			}
		}
		int ans1=0,ans2=0;
		if(b1==r1)
		{
			ans1=b1;
		}
		else if(b1>r1)
		{
			ans1 = r1+(b1-r1);
		}
		else
		{
			ans1 = b1+(r1-b1);
		}
		
		if(b2==r2)
		{
			ans2=b2;
		}
		else if(b2>r2)
		{
			ans2 = r2+(b2-r2);
		}
		else
		{
			ans2 = b2+(r2-b2);
		}
		
		System.out.println(Math.min(ans1, ans2));

	}

}
