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 cockroaches{

    public static void main(String[] args){
         Scanner in = new Scanner(System.in);
         int n = in.nextInt();
         String a = in.next();
         
         int[] answers = new int[2];
        
         // 0 = red, 1 = blue
         for (int startcolor = 0; startcolor < 2; startcolor++) {
         
             int rsb = 0;
             int bsr = 0;
             for (int i = 0; i < n; i++) {
                 int shouldbe = (startcolor + i) % 2;
                 if (a.charAt(i) == 'r' && shouldbe == 1)
                    rsb++;
                 else if (a.charAt(i) == 'b' && shouldbe == 0)
                    bsr++;
             }
             answers[startcolor] = Math.max(rsb, bsr);
         
         }
         
         System.out.println(Math.min(answers[0], answers[1]));
    }

}