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


/**
 * Implementation
 * 
 * Manish Jindal
 * 
*/
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.StringTokenizer;
import java.math.BigInteger;

 
public  class Anatoly
{
    
    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[])
    {
        // put your code here
        int n,c;
        FastReader fr = new FastReader();
        

        int cnt1b = 0,cnt2b=0;
        int cnt1r = 0,cnt2r=0;
        int a=0,b;
        n = fr.nextInt();

        
            String s =fr.nextLine();
            for(int j=0;j<s.length();j++)
            {
                char ch = s.charAt(j);
                if(ch=='b' && j%2==0) cnt1b++;
                else if(ch=='b') cnt2b++;
                else if(j%2==0) cnt2r++;
                else cnt1r++;
            }
            int u = cnt1b+cnt1r;
            int v = cnt2b+cnt2r;
            int ns = 0,nr;
            if(u>v)
            {
                // start with b
                
                int wb=0,wr=0;
                for(int j=0;j<s.length();j++)
                {
                    char ch = s.charAt(j);
                    
                    if(j%2==0 && ch=='r')
                        wr++;
                    if(j%2!=0 && ch=='b')
                        wb++;
                }
                ns = wr<wb?wr:wb;
                nr = wr+wb-ns-ns;
            }
            else
            {
                // start with r
                
                int wb=0,wr=0;
                for(int j=0;j<s.length();j++)
                {
                    char ch = s.charAt(j);
                    
                    if(j%2==0 && ch=='b')
                        wb++;
                    if(j%2!=0 && ch=='r')
                        wr++;
                }
                ns = wr<wb?wr:wb;
                nr = wr+wb-ns-ns;
            }
        System.out.println(ns+nr);
        
    }
}
