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.*;
import java.math.BigInteger;
import java.util.*;



public class JavaApplication7 {
  
    public static void main(String[] args) throws Exception
    {
      Reader.init(System.in);
      
      int n = Reader.nextInt() ;
      String x = Reader.next() ;
      StringBuilder s1 = new StringBuilder() ;
      StringBuilder s2 = new StringBuilder() ;
     int a = 0 ;
     int b = 0;
     for(int i = 0 ; i < n ; i++)
         if(i % 2 != 0 && x.charAt(i) == 'r')
         {
            a++;
             
             
         }
         else if(i % 2 == 0 && x.charAt(i) == 'b')
             b++;
     int m1 = Math.min(a, b) + (Math.max(a, b) - Math.min(a, b)) ;
     a = 0 ; b = 0;
    
      for(int i = 0 ; i < n ; i++)
         if(i % 2 == 0 && x.charAt(i) == 'r')
         {
            a++;
             
             
         }
         else if(i % 2 != 0 && x.charAt(i) == 'b')
             b++;
    int m2 = Math.min(a, b) + (Math.max(a, b) - Math.min(a, b)) ;
        System.out.println(Math.min(m2, m1));
    }
       
}
        
    
    
    class pair implements Comparable<pair>
    {
     long  mod,pr , w; 
     long  san ; 
    pair( long b  , long x)
    {
   
    
    
    mod = b ;
    san = x ;
  
    }
    @Override
    public int compareTo(pair t) {
        if(t.san <san)
            return 1 ;
        else if(t.san > san) return -1 ;
        else return 0 ;
    }
    
    
    
    }

   
    
class Reader {
    static BufferedReader reader;
    static StringTokenizer tokenizer;

    
    static void init(InputStream input) {
        reader = new BufferedReader(
                     new InputStreamReader(input) );
        tokenizer = new StringTokenizer("");
    }

   
    static String next() throws IOException {
        while ( ! tokenizer.hasMoreTokens() ) {
            
            tokenizer = new StringTokenizer(
                   reader.readLine() );
        }
        return tokenizer.nextToken();
    }

    static int nextInt() throws IOException {
        return Integer.parseInt( next() );
    }
	
    static double nextDouble() throws IOException {
        return Double.parseDouble( next() );
    }
    static long nextLong() throws IOException{
    return Long.parseLong(next()) ;
    }
}