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

/* IMPORTANT: Multiple classes and nested static classes are supported */

/*
 * uncomment this if you want to read input.
import java.io.BufferedReader;
import java.io.InputStreamReader;
*/
import java.util.*;
import java.io.*;
public class TestClass {
	
	static PrintWriter out = new PrintWriter(System.out);
    public static void main(String args[] ) throws Exception {
       
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(in.readLine());
        String s = in.readLine();
        int a=0,b=0,c=0,d=0;
        for(int i=0;i<n;i++)
        {
        	if(i%2==0)
        	{
        		if(s.charAt(i)=='b')
        		{
        			a++;
        		}
        		if(s.charAt(i)=='r')
        		{
        			c++;
        		}
        	}
        	if(i%2==1)
        	{
        		if(s.charAt(i)=='r')
        		{
        			b++;
        		}
        		if(s.charAt(i)=='b')
        		{
        			d++;
        		}
        	}
        	
        }
        out.println(Math.min(Math.max(a, b), Math.max(c, d)));
        out.close();
    }
    
}