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 B
{
    String line;
    StringTokenizer inputParser;
    BufferedReader is;
    FileInputStream fstream;
    DataInputStream in;
    String FInput="";
    
    void openInput(String file)
    {

            if(file==null)is = new BufferedReader(new InputStreamReader(System.in));//stdin
            else
            {
                    try{
            
                            
                    fstream = new FileInputStream(file);
                    in = new DataInputStream(fstream);
                    is = new BufferedReader(new InputStreamReader(in));
                    }catch(Exception e)
                    {
                            System.err.println(e);
                    }
            }

    }
    
    void readNextLine()
	{
		try {
			line = is.readLine();
			inputParser = new StringTokenizer(line, " ,\t");
			//System.err.println("Input: " + line);
		} catch (IOException e) {
			System.err.println("Unexpected IO ERROR: " + e);
		}	
		catch (NullPointerException e)
		{
			line=null;
			
		}
		
	}
    
    long NextLong()
    {
            String n = inputParser.nextToken();
            
            long val = Long.parseLong(n);
            
             return val;
    }
    
    int NextInt()
    {
            String n = inputParser.nextToken();
            int val = Integer.parseInt(n);
            
            //System.out.println("I read this number: " + val);
            return val;
    }
    
    double NextDouble()
    {
            String n = inputParser.nextToken();
            double val = Double.parseDouble(n);
            
            //System.out.println("I read this number: " + val);
            return val;
    }
    
    String NextString()
    {
            String n = inputParser.nextToken();
            return n;
    }
    
    void closeInput()
    {
            try {
                    is.close();
            } catch (IOException e) {
                    System.err.println("Unexpected IO ERROR: " + e);
            }
                    
    }
    
    public static void main(String [] argv)
    {
            //String filePath="circles.in";
            String filePath=null;
            if(argv.length>0)filePath=argv[0];
            new B(filePath);
            
    }
    
    public B(String inputFile)
    {
    	openInput(inputFile);
		//readNextLine();
		int T=1;//NextInt();
		StringBuilder sb = new StringBuilder();
		for(int t=1; t<=T; t++)
		{
			readNextLine();
			int N=NextInt();
			readNextLine();
			boolean [] a = new boolean[N];
			for(int i=0; i<N; i++)
			{
				a[i] = line.charAt(i)=='b';
			}
			int r=0, b=0;
			for(int i=0; i<N; i++)
			{
				if(a[i++])r++;
				if(i<N&&!a[i])b++;
			}
			int ret = Math.min(r, b);
			r-=ret;
			b-=ret;
			ret+=r;
			ret+=b;
			
			r=0;
			b=0;
			for(int i=0; i<N; i++)
			{
				if(!a[i++])r++;
				if(i<N&&a[i])b++;
			}
			int ret2 = Math.min(r, b);
			r-=ret2;
			b-=ret2;
			ret2+=r;
			ret2+=b;
			
			if(ret>ret2)ret=ret2;
			sb.append(ret);
			
		}
		System.out.print(sb);
		
		closeInput();		
	}

}