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.util.*;
import java.io.*;
import java.math.BigInteger;

public class Test
{
	public static void main(String[] args) 
	{
		InputReader input=new InputReader(System.in);
        OutputStream outputStream = System.out;
        PrintWriter out=new PrintWriter(outputStream);

        int n = input.nextInt();
        StringBuilder string = new StringBuilder(input.nextLine());
        
        int misplacedRRB=0,misplacedBRB=0,misplacedRBR=0,misplacedBBR=0;
        int countRB=0,countBR=0;
        int flagRB=0,flagBR=0;
        for(int i=0;i<n;i++){
        	
        	if(flagRB==0){
        		if(string.charAt(i)!='r')
        			misplacedRRB++;
        		flagRB=1;
        	}else{
        		if(string.charAt(i)!='b')
        			misplacedBRB++;
        		flagRB=0;
        	}
        }
        if(misplacedRRB>misplacedBRB)
        	countRB=misplacedRRB;
        else
        	countRB=misplacedBRB;
        
        
        for(int i=0;i<n;i++){
        	
        	if(flagBR==0){
        		if(string.charAt(i)!='b')
        			misplacedBBR++;
        		flagBR=1;
        	}else{
        		if(string.charAt(i)!='r')
        			misplacedRBR++;
        		flagBR=0;
        	}
        }
        if(misplacedRBR>misplacedBBR)
        	countBR=misplacedRBR;
        else
        	countBR=misplacedBBR;
        
        if(countRB<countBR)
        	System.out.println(countRB);
        else
        	System.out.println(countBR);
        
        
        
        out.close();

	}   
	
	static long gcd(long a,long b)
	{
		if(b==0)
			return a;
		a%=b;
		return gcd(b,a);
	}
	
	static long exp(long a, long b)
	{
		if(b==0)
			return 1;
		if(b==1)
			return a;
		if(b==2)
			return a*a;

		if(b%2==0)
			return exp(exp(a,b/2),2);
		else
			return a*exp(exp(a,(b-1)/2),2);
	}
	
	static int findLastOccurence(int a[], int val, int lb, int ub)
	{
		int mid = (lb+ub)/2;
		
		if(mid==lb && a[mid]>val )
		{
			return -1;
		}
		
		if (a[mid] <= val && (mid == ub || a[mid + 1] > val)) {
            return mid;
        }

        if (a[mid] <= val) 
        {   
            return findLastOccurence(a, val, mid + 1, ub);
        }
        else
        {
            return findLastOccurence(a, val, lb, mid);
        }
	}

	static class Pair implements Comparable<Pair>
	{
		long x,y;
		Pair(long ii, long cc)
		{
			x=ii;
			y=cc;
		}
		
		public int compareTo(Pair o) 
		{
			return Long.compare(this.x, o.x);
		}
		
	}

    public static class InputReader 
    {
    	public BufferedReader reader;
    	public StringTokenizer tokenizer;
     
    	public InputReader(InputStream inputstream) 
    	{
    	      reader = new BufferedReader(new InputStreamReader(inputstream));
    	      tokenizer = null;
    	}
    	    
    	public String nextLine()
    	{
    	    String fullLine=null;
    	    while (tokenizer == null || !tokenizer.hasMoreTokens()) 
    	    {
    	        try
    	        {
    	        	fullLine=reader.readLine();
    	        } 
    	        catch (IOException e) 
    	        {
    	            throw new RuntimeException(e);
    	        }
    	        return fullLine;
    	     }
    	     return fullLine;
    	}
    		
    	public String next() 
    	{
    		while (tokenizer == null || !tokenizer.hasMoreTokens()) 
    		{
    			try
    			{
    				tokenizer = new StringTokenizer(reader.readLine());
    			}
    			catch (IOException e) 
   				{
   					throw new RuntimeException(e);
   				}
   			}
    		return tokenizer.nextToken();
    	}
    		
    	public long nextLong() 
    	{
    		return Long.parseLong(next());
    	}
    		
    	public int nextInt() 
    	{
    		return Integer.parseInt(next());
    	}
    }
 
}