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.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.StringTokenizer;


public class B {

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		String s = sc.next();
		int reven = 0,rodd = 0 , beven = 0 , bodd = 0;
		for(int i=0;i<n;i++)
		{
			if(i%2==0)
			{
				if(s.charAt(i) =='r')
					reven++;
				else
					beven++;
			}
			else
			{
				if(s.charAt(i) =='r')
					rodd++;
				else
					bodd++;
			}

		}
		int reqEven =(int) Math.ceil(n/2.0); 
		int reqOdd = (int) Math.floor(n/2.0);
		int ans =0;
		int evenMax= Math.max(reven, beven);
		int oddMax = Math.max(rodd, bodd);

		if(evenMax>oddMax)
		{
			if(reven > beven)
			{
				int swaps = Math.min(rodd, reqEven-reven);
				ans+=swaps;
				beven-=swaps;
				rodd-=swaps;
				reven+=swaps;
				bodd+=swaps;
				if(reven!=reqEven)
					ans+=(reqEven-reven);
				if(bodd!=reqOdd)
					ans+=(reqOdd-bodd);

			}
			else
			{
				int swaps = Math.min(bodd, reqEven-beven);
				ans+=swaps;
				reven-=swaps;
				bodd-=swaps;
				beven+=swaps;
				rodd+=swaps;
				if(beven!=reqEven)
					ans+=(reqEven-beven);
				if(rodd!=reqOdd)
					ans+=(reqOdd-rodd);
			}
		}
		else
		{
			
			if(rodd > bodd)
			{
				int swaps = Math.min(reven, reqOdd-rodd);
				ans+=swaps;
				bodd-=swaps;
				reven-=swaps;
				rodd+=swaps;
				beven+=swaps;
				if(rodd!=reqOdd)
					ans+=(reqOdd-rodd);
				if(beven!=reqEven)
					ans+=(reqEven-beven);
			}
			else
			{
				int swaps = Math.min(beven, reqOdd-bodd);
				ans+=swaps;
				rodd-=swaps;
				beven-=swaps;
				bodd+=swaps;
				reven+=swaps;
				if(bodd!=reqOdd)
					ans+=(reqOdd-bodd);
				if(reven!=reqEven)
					ans+=(reqEven-reven);
			}
		}


		System.out.println(ans);




	}

	static class Scanner 
	{
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

		public String next() throws IOException 
		{
			while (st == null || !st.hasMoreTokens()) 
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {return Integer.parseInt(next());}

		public long nextLong() throws IOException {return Long.parseLong(next());}

		public String nextLine() throws IOException {return br.readLine();}

		public double nextDouble() throws IOException
		{
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if(x.charAt(0) == '-')
			{
				neg = true;
				start++;
			}
			for(int i = start; i < x.length(); i++)
				if(x.charAt(i) == '.')
				{
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				}
				else
				{
					sb.append(x.charAt(i));
					if(dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg?-1:1);	
		}

		public boolean ready() throws IOException {return br.ready();}
	}


}
