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 CodeForces_719B {
	public static void main(String[] args) {
		Scanner a = new Scanner(System.in);
		try{
			int n = a.nextInt();
			String cuc = a.next();
			cuc = cuc.toLowerCase();
			String cu = "br"; int i = 0; 	int cont=0;	
			if (cuc.startsWith("r")== true)cu = "rb";
			while(i < n-1){
				if (i == 0){
					if	(cuc.substring(i,i+2).equals(cu)== false){
						cuc=cu+cuc.substring(i+2);
						cont++;
					}
				}else if (cuc.substring(i,i+2).equals(cu)== false){				
					cuc=(cuc.substring(0,i)+cu+cuc.substring(i+2));
					cont++;
				}
					i=i+2;
			}
			System.out.println(cont);
		}catch(Exception e){
			System.out.println("Error");
		}	
	}
}