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.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.Scanner;
import java.io.File;
import java.io.FileNotFoundException;
 
public class Main {
	static Scanner in;
	static int n, xr = 0, yr = 0, xb = 0, yb = 0;
	static char s[], sr[], sb[];
	public static void main(String[] args) throws FileNotFoundException {
//		in = new Scanner(new File("input.txt"));
		in = new Scanner(System.in);
		n = in.nextInt();
		sr = new char[n];
		sb = new char[n];
		for(int i = 0;i < n;i++){
			if(i%2 == 0){
				sr[i] = 'r';
				sb[i] = 'b';
			}else{
				sr[i] = 'b';
				sb[i] = 'r';
			}
		}
		s = in.next().toCharArray();
		for(int i = 0;i < n;i++){
			if(s[i] == 'r' && sr[i] == 'b') xr++;
			else if(s[i] == 'b' && sr[i] == 'r') yr++;
			if(s[i] == 'r' && sb[i] == 'b') xb++;
			if(s[i] == 'b' && sb[i] == 'r') yb++;
		}
		System.out.println(Math.min(Math.max(xr, yr), Math.max(xb, yb)));
	}
}