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.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class AnatolyAndCocrges {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
	
		MyScanner input =new MyScanner();
		int n  = input.nextInt();
		String s = input.next();
		
		// consider first one as red
		System.out.println(Math.min(find(s,0),find(s,1)));
		

	}
	
	static int find(String s, int index) {
		if(index==0) {
			int r = 0;
			int b = 0;
			for(int i=0; i<s.length();i++) {
				if(i%2==0 && s.charAt(i)!='r')r++;
				else if(i%2==1 && s.charAt(i)!='b')b++;
				
			}
	//		System.out.println(r+" "+b);
			int z = Math.min(r,b);
			r-=z;
			b-=z;
			z+=r+b;
			return z;
		}
		else {
			int r = 0;
			int b = 0;
			for(int i=0; i<s.length();i++) {
				if(i%2==0 && s.charAt(i)!='b')b++;
				else if(i%2==1 && s.charAt(i)!='r')r++;
				
			}
			int z = Math.min(r, b);
			r-=z;
			b-=z;
			z+=r+b;
			return z;
		}
	}

	static class MyScanner {
		BufferedReader br;
		StringTokenizer st;
		public MyScanner() {br = new BufferedReader(new InputStreamReader(System.in));}
		String next() {while (st == null || !st.hasMoreElements()) {
			try {st = new StringTokenizer(br.readLine());}
			catch (IOException e) {e.printStackTrace();}}
		return st.nextToken();}
		int nextInt() {return Integer.parseInt(next());}
		long nextLong() {return Long.parseLong(next());}
		double nextDouble() {return Double.parseDouble(next());}
		String nextLine(){String str = "";
		try {str = br.readLine();}
		catch (IOException e) {e.printStackTrace();}
		return str;}
	}
}
