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.ArrayList;
import java.util.Iterator;
import java.util.Scanner;
import java.util.TreeSet;

public class MSNG{
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int n=sc.nextInt();
		String s=sc.next();
		char[] ch=s.toCharArray();
		int r=0,b=0;
		for(int i=0;i<n;i++) {
			if(i%2==0) {
				if(ch[i]=='r')r++;
			}
			else {
				if(ch[i]=='b') b++;
			}
		}
		int r1=0,b1=0;
		for(int i=0;i<n;i++) {
			if(i%2==0) {
				if(ch[i]=='b')b1++;
			}
			else {
				if(ch[i]=='r') r1++;
			}
		}
		if(r1==b1 || r==b) {
			r=Math.min(r, b1);
			r=Math.min(r, b);
			System.out.println(Math.min(r1,r));
		}
		else {
			System.out.print(Math.max(r, b));
		}
	}
}