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.
 */

//package javacollections;

import java.util.Scanner;

/**
 *
 * @author DELL
 */
public class Cockroacches
{
    public static void main(String[] args)
    {
        Scanner sc=new Scanner(System.in);
        int t=sc.nextInt();
        String s=sc.next();
        int rc=0,bc=0;
        boolean flagr=false; 
        char ch=s.charAt(0);
      if(ch=='r')
         flagr=true;
      int count=0;
         for(int i=0;i<t;i++)
    {
          if(s.charAt(i)=='r')
           rc++;
        if(flagr)
        {
           if( i%2!=0 && s.charAt(i)=='r')  
               count++;
        }
        
        else if(flagr==false)
        {
               if(i%2!=0 && s.charAt(i)=='b')
                   count++;
          }    
        
     
    }
    
    bc=t-rc;
    
    if(rc==t || bc==t && t%2!=0)
    {
        System.out.println((t-1)/2);
    }
    else if(rc==t || bc==t && t%2==0)
    {
    
        System.out.println(t/2);
    }
  
    else  
            System.out.println(count);
    }
    
}
