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.*;
public class AnatolyAndCockroaches {

	public static void main (String args[])
	{

		Scanner kbd = new Scanner(System.in);
		int n =kbd.nextInt();
		String s= kbd.next();
		System.out.println(ans(s,n));

	}
	
	public static int ans(String s, int n){
		char arr[] = s.toCharArray();
		int cntb=0;
		int cntr=0;


			for(int i=0; i<n ;i++)
			{
				if(i%2==0)
				{
					if(arr[i]!='r')
					{
						cntb++;

					}
					else continue;
				}
				else
				{
					if(arr[i]!='b')
					{
						cntr++;

					}
					else continue;

				}
			}

			int ans =Math.max(cntb,cntr);

		cntr=0;
		cntb=0;

				for(int i=0;i<n;i++)
				{

					if(i%2==0)
					{
						if(arr[i]!='b')
						{
						cntr++;
						}
					}
					else
					{
						if(arr[i]!='r')
						cntb++;
					}
				}

		ans = Math.min(ans, Math.max(cntr,cntb));
		return ans;
	}

}