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.Scanner;

public class B {
	static int bOdd=0,bEven=0,rOdd=0,rEven=0;
	public static void main(String args[])
	{
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		sc.nextLine();
		String s = sc.nextLine();
		for (int i=0;i<n;i++)
		{
			char c = s.charAt(i);
			boolean odd = (i&1)==1;
			if (odd && c=='b')
				bOdd++;
			else if (odd && c=='r')
				rOdd++;
			else if (!odd && c=='b')
				bEven++;
			else
				rEven++;
		}
		//System.out.println(rEven+" " +rOdd+" "+bEven+" "+bOdd);
		if (n%2==0)
		{
			if (rEven+rOdd == bEven+bOdd)
			{
				System.out.println(Math.max(rOdd, rEven));
			}
			else
			{
				int x = Math.min(rOdd, bEven);
				rOdd-=x;
				bEven-=x;
				x+=rOdd;
				x+=bEven;
				int y = Math.min(rEven, bOdd);
				bOdd-=y;
				rEven-=y;
				y+=bOdd;
				y+=rEven;
				System.out.println(Math.min(x, y));
			}
		}
		else
		{
			if (bEven+bOdd+1 == rEven+rOdd)
			{
				System.out.println(bEven);
			}
			else if (bEven+bOdd-1 == rEven+rOdd)
			{
				System.out.println(rEven);
			}
			else
			{
				int x = Math.min(rOdd, bEven);
				rOdd-=x;
				bEven-=x;
				x+=rOdd;
				x+=bEven;
				int y = Math.min(rEven, bOdd);
				bOdd-=y;
				rEven-=y;
				y+=bOdd;
				y+=rEven;
				System.out.println(Math.min(x, y));
			}
		}
	}
}
