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 coding;
import java.io.*;
import java.util.*;

public class IPC {
	public static void main(String[] args) {
		FastReader s=new FastReader();
		PrintWriter pr=new PrintWriter(System.out,true);
		int n=s.nextInt();
		String x=s.nextLine();
		char a[]=x.toCharArray();
		int b=0,r=0;
		
		int ans=0;
		
			int r1=0,r2=0,b1=0,b2=0;
			for(int i=0;i<n;i++){
				
				if(a[i]!='r'&&i%2==0){
					r1++;
				}
				else if(a[i]!='b'&&i%2==1){
					b1++;
				}
				
				if(a[i]!='b'&&i%2==0){
					b2++;
				}
				else if(a[i]!='r'&&i%2==1){
					r2++;
				}
			
			}
			
				ans=Math.min(r1, b1);
				ans+=Math.max(r1, b1)-Math.min(r1, b1);
			
				int ans2=Math.min(r2, b2);
				ans2+=Math.max(r2, b2)-Math.min(r2, b2);
			pr.println(Math.min(ans, ans2));
		pr.close();
	}
}

class FastReader
{
	BufferedReader br;
	StringTokenizer st;

	public FastReader()
	{
		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;
	}
}
