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

import javafx.util.Pair;

public class Main
{

    public static void main(String[] args)
    {
        FastScanner input = new FastScanner();

        int n = input.nextInt();
        String s = input.next();
        int start = (s.charAt(0) == 'r') ? 1 : 2;
//        System.out.println(start);
        int needred=0,needblue=0;
        if (start == 1) {
            for (int i = 0; i < n; i++) {
                if(i%2==0)
                {
                    if(s.charAt(i)!='r')
                        needred++;
                        
                    //red
                }
                else
                {
                    if(s.charAt(i)!='b')
                        needblue++;
                    //blue
                }
            }
        } else {
                        for (int i = 0; i < n; i++) {
                if(i%2!=0)
                {
                    if(s.charAt(i)!='r')
                        needred++;
                        
                    //red
                }
                else
                {
                    if(s.charAt(i)!='b')
                        needblue++;
                    //blue
                }
            }
        }
        System.out.println(Math.max(needred, needblue));

    }

    static class FastScanner
    {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer("");

        String next()
        {
            while (!st.hasMoreTokens()) {
                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() throws IOException
        {
            return br.readLine();
        }
    }

}
