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.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.StringTokenizer;
import java.math.BigInteger;
 public class cock
 
 {
	static 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;
        }
    }
	public static void main(String args[])
	{
		try{
		FastReader s=new FastReader();
		int n=s.nextInt();
		char a[]=new char[n];
		String ss=s.next();
		int b[]= new int[n];
		int c[]=new int[n];
		Arrays.fill(b,-1);
		Arrays.fill(c,-1);
		int k=0;
		int j=0;
		int co1=0;
		int co2=0;
		int co3=0;
		int co4=0;
		for(int i=0;i<n;i++)
		{
			a[i]= ss.charAt(i);
			if(a[i]=='r')
			{
				b[k]=i;
				if((i+1)%2==0)
				{
					co2++;
				}
				else
				{
					co1++;
				}
				k++;
			}
			if(a[i]=='b')
			{
				c[j]=i;
				if((i+1)%2==0)
				{
					co4++;
				}
				else
				{
					co3++;
				}
				
				j++;
			}
			
			
		}
		if(k>=j)
		{
			if(co1>=co2)
			{
				if(co2>=co3)
				{
					System.out.println(co2);
				}
				else{
					System.out.println(co3);
				}
			}
			else{
				if(co1>=co4)
				{
					System.out.println(co1);
				}
				else{
					System.out.println(co4);
				}
				
			}
			
		}
		else{
			if(co3>=co4)
			{
				if(co4>=co1)
				{
					System.out.println(co4);
				}
				else{
					System.out.println(co1);
				}
			}
			else{
				if(co3>=co2)
				{
					System.out.println(co3);
				}
				else{
					System.out.println(co2);
				}
			}
			
			
		}
		}
		catch(Exception e)
		{
			return;
		}
		
	}
 }