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.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.StringTokenizer;

public class Prop {
 
    public static void main(String[] args) throws IOException {
     BufferedReader br= new BufferedReader(new InputStreamReader(System.in));
     StringTokenizer st=new StringTokenizer(br.readLine());
     st=new StringTokenizer(br.readLine());
     String g=st.nextToken();
     int b=0;
     int r=0;
      char h=g.charAt(0);
        for (int i = 0; i < g.length()-1; i+=2) {
           if(g.charAt(i)!=h)b++;    
           if(g.charAt(i+1)==h)r++;    
        }if(b>r)System.out.println(b);
        else System.out.println(r);
    }
}