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.util.*;
public class B_2 {
	public static void main(String[]args)throws Throwable{
		PrintWriter pw=new PrintWriter(System.out,true);
		MyScanner sc=new MyScanner();
		int n=sc.nextInt();
		char [] a=sc.next().toCharArray();
		
		
		int ans1=0;
		int ans2=0;
		
		StringBuilder RB=new StringBuilder();
		for(int i=0;i<n;i++){
			if(i%2==0)
				RB.append('r');
			else
				RB.append('b');
		}
		
		int red=0,blue=0;
		String s=RB.toString();
		for(int i=0;i<n;i++){
			if(a[i]!=s.charAt(i)){
				if(s.charAt(i)=='r')
					red++;
				else
					blue++;
			}
		}
		ans1=Math.max(red, blue);
		StringBuilder BR=new StringBuilder();
		for(int i=0;i<n;i++){
			if(i%2==0)
				BR.append('b');
			else
				BR.append('r');
		}
		
		red=0;
		blue=0;
		s=BR.toString();
		for(int i=0;i<n;i++){
			if(a[i]!=s.charAt(i)){
				if(s.charAt(i)=='r')
					red++;
				else
					blue++;
			}
		}
		ans2=Math.max(red, blue);
		
		int ans=Math.min(ans2, ans1);
		pw.println(ans);
		pw.flush();
		pw.close();
	}
	
	
	
	static class MyScanner {
	      BufferedReader br;
	      StringTokenizer st;
	 
	      public MyScanner() {
	         br = new BufferedReader(new InputStreamReader(System.in));
	      }
	 
	      String next() {
	          while (st == null || !st.hasMoreElements()) {
	              try {
	                  st = new StringTokenizer(br.readLine());
	              } catch (IOException e) {
	                  e.printStackTrace();
	              }
	          }
	          return st.nextToken();
	      }
	 
	      int nextInt() {
	          return Integer.parseInt(next());
	      }
	 
	      long nextLong() {
	          return Long.parseLong(next());
	      }
	 
	      double nextDouble() {
	          return Double.parseDouble(next());
	      }
	 
	      String nextLine(){
	          String str = "";
		  try {
		     str = br.readLine();
		  } catch (IOException e) {
		     e.printStackTrace();
		  }
		  return str;
	      }

	   }
}
