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.Scanner;

/**
 * Created by sanjayarvind on 04/05/2017 AD.
 */
public class class22 {
    public static void main(String args[]) {
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt(),cnt=0;
        char[] cocks=sc.next().toCharArray();
        boolean red=false,blue=false;
        if (cocks[0]=='r')red=true;
        else blue=true;
        for (int i = 1; i < n; i++) {
            if (red){
                if (cocks[i]=='r'){
                    int j=i+1;
                    for (;j<n;j++)if (cocks[j]=='b')break;
                    if (j==n)cnt++;
                    else {
                        char t=cocks[i];
                        cocks[i]=cocks[j];
                        cocks[j]=t;
                        cnt++;
                    }
                }
            }
            else {
                if (cocks[i]=='b'){
                    int j=i+1;
                    for(;j<n;j++)if (cocks[j]=='r')break;
                    if (j==n)cnt++;
                    else {
                        cnt++;
                        char t=cocks[j];
                        cocks[j]=cocks[i];
                        cocks[i]=t;
                    }
                }
            }
            if (red){
                red=false;
                blue=true;
            }
            else {
                red=true;
                blue=false;
            }
        }
        System.out.println(cnt);
    }
}
