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.PrintWriter;
import java.util.Scanner;
public class B719 {
    static Scanner in = new Scanner(System.in);
    static PrintWriter out =  new PrintWriter(System.out);
    static final int N = 100005;
    static int n , ans1 ,ans2;
    static char[]s = new char[N];
    static int [] countr = new int[2] , countb = new int[2];
    public static void main(String[] args) {
        n = in.nextInt();
        StringBuilder str = new StringBuilder(in.next());
        for(int i = 0;i<n;++i)
            s[i] = str.charAt(i);
        for(int i = 0;i < n;i++){
            if(s[i] == 'b')
                ++countb[i&1];
            else ++countr[i&1];
        }
        ans1 = Math.abs(countb[0] - countr[1]) + Math.min(countb[0],countr[1]);
        ans2 = Math.abs(countb[1] - countr[0]) + Math.min(countb[1],countr[0]);
        out.println(Math.min(ans1, ans2));
        out.flush();
    }
}
