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 tejas
 */
public class cockRoach {
    public static void main(String args[])
    {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        
        String[] a = new String[n];
        String inp = in.next();
        
        for(int i=0;i<n;i++)
        {
            a[i] = inp.substring(i, i+1);
        }
        
        int count11 = 0;
        int count12 = 0;
        int count21 = 0;
        int count22 = 0;
        for(int i=0;i<=n-1;i++)
        {
           if(i%2 ==0 )
           {
               if(a[i].compareTo("b") == 0)
                   count11++;
               else
                   count22++;
                   
           }
           else
           {
               if(a[i].compareTo("b") == 0)
                   count21++;
               else
                   count12++;
               
           }
        }
        int temp1, temp2;
        if(count11 > count12)
            temp1 = count11;
        else
            temp1 = count12;
        
        if(count21 > count22)
            temp2 = count21;
        else
            temp2 = count22; 
        
        if(temp1<temp2)
            System.out.println(temp1);
        else
            System.out.println(temp2);
        
   
    }
    
}
