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.util.Scanner;

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

    static class TaskCF373D2B {
        int solve(char[] c, char fc) {
            char[] end = new char[c.length];

            end[0] = fc;
            for (int i = 1; i < end.length; i++) {
                char prev = end[i - 1];

                end[i] = (end[i - 1] == 'b') ? 'r' : 'b';
            }


            int same, btr, rtb;
            same = btr = rtb = 0;

            for (int i = 0; i < c.length; i++) {
                if (c[i] == end[i]) {
                    same++;
                } else if (c[i] == 'b') {
                    btr++;
                } else {
                    rtb++;
                }
            }

            return Math.max(btr, rtb);
        }

        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int n = in.nextInt();

            char[] c = in.next().toCharArray();

            int turns = solve(c, 'b');

            turns = Math.min(turns, solve(c, 'r'));

            out.println(turns);
        }

    }
}

