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

public class A {
    static FastReader f = new FastReader();

    public static void main(String[] args) {
        int n = f.nextInt();
        String s = f.next();

        int rErr = 0, bErr = 0;
        for(int i=0;i<n;i++) {
            if((i&1)==0) {
                if(s.charAt(i) == 'b') {
                    bErr++;
                }
            } else {
                if(s.charAt(i) == 'r') {
                    rErr++;
                }
            }
        }

        int ans = Math.max(rErr,bErr);
        rErr = 0;
        bErr = 0;
        for(int i=0;i<n;i++) {
            if((i&1)==0) {
                if(s.charAt(i) == 'r') {
                    bErr++;
                }
            } else {
                if(s.charAt(i) == 'b') {
                    rErr++;
                }
            }
        }
        ans = Math.min(ans, Math.max(rErr, bErr));

        System.out.println(ans);
    }

    //fast input reader
    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;
        }
    }
}
