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

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */


import java.util.Scanner;

/**
 *
 * @author USER
 */
public class Main {
    public static void main(String[] args){
        Scanner scanner=new Scanner(System.in);
        int n=scanner.nextInt();
        String s=scanner.next();
        boolean[] sb=new boolean[n];
        for(int i=0;i<n;i++){
            sb[i]=(s.charAt(i)=='r');
        }
        System.out.println(Math.min(get(sb,true),get(sb,false)));
    }
    static int get(boolean[] actual, boolean start){
        int goodTrues=0;
        int goodFalses=0;
        int badTrues=0;
        int badFalses=0;
        int n=actual.length;
        boolean current=start;
        for(int i=0;i<n;i++,current=!current){
            if(current==actual[i]){
                if(current){
                    goodTrues++;
                }else{
                    goodFalses++;
                }
            }else{
                if(current){
                    badFalses++;
                }else{
                    badTrues++;
                }
            }
        }
        
        int swaps=Math.min(badFalses,badTrues);
        int changes=badFalses+badTrues-2*swaps;
        return changes+swaps;
    }
}
