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.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.StringTokenizer;
import java.io.Writer;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author zodiacLeo
 */
public class Main
{
    public static void main(String[] args)
    {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastScanner in = new FastScanner(inputStream);
        FastPrinter out = new FastPrinter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB
    {
        private int N;
        private boolean[] now;
        private boolean[] row1;
        private boolean[] row2;

        public void solve(int testNumber, FastScanner in, FastPrinter out)
        {
            N = in.nextInt();
            int red1 = 0;
            int black1 = 0;

            int red2 = 0;
            int black2 = 0;
            now = new boolean[N];
            row1 = new boolean[N];
            row2 = new boolean[N];
            row1[0] = true;
            String line = in.next();
            for (int i = 0; i < N; i++)
            {
                now[i] = line.charAt(i) == 'r';
                if (i > 0)
                {
                    row1[i] = !row1[i - 1];
                    row2[i] = !row2[i - 1];
                }
                if (row1[i] != now[i])
                {
                    if (row1[i])
                    {
                        red1++;
                    } else
                    {
                        black1++;
                    }
                }
                if (row2[i] != now[i])
                {
                    if (row2[i])
                    {
                        red2++;
                    } else
                    {
                        black2++;
                    }
                }
            }
            int moves = N;
            int min = Math.min(red1, black1);
            red1 -= min;
            black1 -= min;
            moves = Math.min(moves, min + red1 + black1);

            min = Math.min(red2, black2);
            red2 -= min;
            black2 -= min;
            moves = Math.min(moves, min + red2 + black2);

            out.println(moves);
        }

    }

    static class FastScanner
    {
        public BufferedReader br;
        public StringTokenizer st;

        public FastScanner(InputStream is)
        {
            br = new BufferedReader(new InputStreamReader(is));
        }

        public FastScanner(File f)
        {
            try
            {
                br = new BufferedReader(new FileReader(f));
            } catch (FileNotFoundException e)
            {
                e.printStackTrace();
            }
        }

        public String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                String s = null;
                try
                {
                    s = br.readLine();
                } catch (IOException e)
                {
                    e.printStackTrace();
                }
                if (s == null)
                    return null;
                st = new StringTokenizer(s);
            }
            return st.nextToken();
        }

        public int nextInt()
        {
            return Integer.parseInt(next());
        }

    }

    static class FastPrinter extends PrintWriter
    {
        public FastPrinter(OutputStream out)
        {
            super(out);
        }

        public FastPrinter(Writer out)
        {
            super(out);
        }

    }
}

