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.*;
public class ProblemB {
	private static int min(int a,int b) {
		if (a < b) return a;
		else return b;
	}
	public static void main(String args[]) {
		Scanner input = new Scanner(System.in);
		input.nextInt();
		input.nextLine();
		String s = input.nextLine();
		int result = min(redStartPaint(s), blackStartPaint(s));
		result = min(result, redStartSwap(s));
		result = min(result, blackStartSwap(s));
		System.out.println(result);
		input.close();
	}
	
	private static int redStartSwap(String s) {
		char a[] = s.toCharArray();
		int n = s.length();
		int count = 0;
		int blackSwapper = -1;
		int redSwapper = -1;
		for(int i = 0; i < n; i++) {
			if ((i % 2 == 0) && (a[i] == 'b')) {
				while (redSwapper < n-1) {
					redSwapper++;
					if ((a[redSwapper] == 'r') && (redSwapper % 2 == 1)) {
						//System.out.println(redSwapper);
						count++;
						char tg = a[i];
						a[i] = a[redSwapper];
						a[redSwapper] = tg;
						break;
					}
				}
				if (a[i] == 'b') return 1000*1000;
			}
			else if ((i % 2 == 1) && (a[i] == 'r')) {
				while (blackSwapper < n-1) {
					blackSwapper++;
					if ((a[blackSwapper] == 'b') && (blackSwapper % 2 == 0)) {
						count++;
						char tg = a[i];
						a[i] = a[blackSwapper];
						a[blackSwapper] = tg;
						break;
					}
				}
				if (a[i] == 'r') return 1000*1000;
			}
		}
		return count;
	}
	
	private static int blackStartSwap(String s) {
		char a[] = s.toCharArray();
		int n = s.length();
		int count = 0;
		int blackSwapper = -1;
		int redSwapper = -1;
		for(int i = 0; i < n; i++) {
			if ((i % 2 == 1) && (a[i] == 'b')) {
				while (redSwapper < n-1) {
					redSwapper++;
					if ((a[redSwapper] == 'r') && (redSwapper % 2 == 0)) {
						//System.out.println(redSwapper);
						count++;
						char tg = a[i];
						a[i] = a[redSwapper];
						a[redSwapper] = tg;
						break;
					}
				}
				if (a[i] == 'b') return 1000*1000;
			}
			else if ((i % 2 == 0) && (a[i] == 'r')) {
				while (blackSwapper < n-1) {
					blackSwapper++;
					if ((a[blackSwapper] == 'b') && (blackSwapper % 2 == 1)) {
						count++;
						char tg = a[i];
						a[i] = a[blackSwapper];
						a[blackSwapper] = tg;
						break;
					}
				}
				if (a[i] == 'r') return 1000*1000;
			}
		}
		return count;
	}
	
	private static int redStartPaint(String s) {
		char a[] = s.toCharArray();
		int n = s.length();
		int count = 0;
		for(int i = 0; i < n; i++) {
			if (i % 2 == 0) {
				if (a[i] == 'b') count++;
			}
			else if (a[i] == 'r') count++;
		}
		return count;
	}
	private static int blackStartPaint(String s) {
		char a[] = s.toCharArray();
		int n = s.length();
		int count = 0;
		for(int i = 0; i < n; i++) {
			if (i % 2 == 0) {
				if (a[i] == 'r') count++;
			}
			else if (a[i] == 'b') count++;
		}
		return count;
	}
}
