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

/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
public class Main{

     public static void main(String []args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        char[] s = sc.next().toCharArray();
        int first = count(s);
        for(int i = 0 ;i<n;++i){
        	s[i] = (s[i] == 'r')? 'b':'r';
        }
        int sec = count(s);
        System.out.println(Math.min(first,sec));
     }
     
    public static int count(char[] s){
    	int n = s.length;
    	  int r = 0;
        int b = 0;
        for(char c: s){
        	if(c == 'r')r++;
        	else b++;
        }
        // start with R
        int r_goal = (n+1)/2;
        int b_goal = n/2;
        int count = Math.abs(r_goal - r);
        char less = (r_goal>=r? 'r': 'b');
        int idx = (less == 'r')? 0 : 1;
        for(int i = 0;i<n;++i){
            if( i%2 !=idx && s[i] == less){
                count++;
            }
        }
        return count;
    }
     
     
     
     
     
     
     
     
     
     
}