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.io.PrintWriter;
import java.util.StringTokenizer;

public class B2 {

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		int len = sc.nextInt();
		char c[] = sc.next().toCharArray();
		int result1=0;
		int result2=0;
		
		int b=0;
		int r=0;
		for(int i=0; i<len ;i++)
			if(c[i]=='r')
				r++;
			else b++;
		int colr=len/2-r;
		int colb=(len&1)==0?len/2-b:len/2-b+1;
		int diff=0;
		for(int i=0; i<len; i++){
			if((i&1)==0){
				if(c[i]=='r')
					if(colb>0){
						result1++;
						colb--;
					}
					else diff++;
			}
			else {
				if(c[i]=='b')
					if(colr>0){
						result1++;
						colr--;
					}
					else diff++;
			}
		}
		result1+=(diff/2);
		colb=len/2-b;
		colr=(len&1)==0?len/2-r:len/2-r+1;
		diff=0;
		for(int i=0; i<len; i++){
			if((i&1)!=0){
				if(c[i]=='r')
					if(colb>0){
						result2++;
						colb--;
					}
					else diff++;
			}
			else {
				if(c[i]=='b')
					if(colr>0){
						result2++;
						colr--;
					}
					else diff++;
			}
		}
		result2+=(diff/2);

		out.println(Math.min(result1, result2));
		out.flush();
		out.close();

	}

	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();
		}

	}

}
