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 javafx.util.Pair;

import java.io.*;
import java.util.*;

/**
 * Created by chao on 16/11/13.
 */
public class A {

    static int[] root;
    static int w;

    public static void main(String[] args) throws IOException {
        PrintWriter pw = new PrintWriter(new OutputStreamWriter(System.out));
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));


        int n = Integer.parseInt(br.readLine());
        String s = br.readLine();
        int ans = Math.min(gao(s, 'r', 'b'), n);
        ans = Math.min(gao(s, 'b', 'r'), ans);
        pw.println(ans);


        pw.flush();
        pw.close();
        br.close();

    }

    private static int gao(String s, char c1, char c2) {
        int n1 = 0, n2 = 0;
        for (int i = 0; i < s.length(); i++) {
            if (i % 2 == 0 && s.charAt(i) != c1)  n1++;
            if (i % 2 == 1 && s.charAt(i) != c2)  n2++;
        }
        return Math.max(n1, n2);
    }


}



