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

public class D1 {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int oddB=0, oddR=0, evenB=0, evenR=0;
        String st = in.next();
        int count,diff;
        char ch;
        for(int i=0; i<n; i++) {
            ch = st.charAt(i);
            if(i%2 == 0) {
                if(ch == 'r') {
                    evenR++;
                } else {
                    evenB++;
                }
            } else {
                if(ch == 'r') {
                    oddR++;
                } else {
                    oddB++;
                }
            }
        }
        int oddMax = Math.max(oddR, oddB);
        int oddMin = Math.min(oddR, oddB);
        int evenMax = Math.max(evenR, evenB);
        int evenMin = Math.min(evenR, evenB);
        if(oddMax > evenMax) {
            count  = Math.abs((oddMin - evenMax)) + Math.min(oddMin, evenMax);
        } else {
            count  = Math.abs((evenMin - oddMax)) + Math.min(evenMin, oddMax);
        }
        diff = Math.abs((oddR+ oddB - evenR - evenB));
        count = count + diff/2;
        System.out.println(count);
    }
    
}