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.InputStreamReader;

public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int t, i, j, n;
		n = readInt(br);
		String str = br.readLine();
		int bfd = 0;
		int rfd = 0;
		int bDiffB, bDiffR, rDiffB, rDiffR;
		bDiffB = bDiffR = rDiffB = rDiffR = 0;
		for (i = 0; i < n; i++) {
			if (i % 2 == 0) {
				if ('b' != str.charAt(i)) {
					bDiffR++;
					bfd++;
				}
				if ('r' != str.charAt(i)) {
					rDiffB++;
					rfd++;
				}
			} else {
				if ('r' != str.charAt(i)) {
					bDiffB++;
					bfd++;
				}
				if ('b' != str.charAt(i)) {
					rDiffR++;
					rfd++;
				}
			}
		}
		if (bfd < rfd) {
			int ans = bDiffB > bDiffR ? bDiffB : bDiffR;
			System.out.println(ans);
			return;
		} else {
			int ans = rDiffB > rDiffR ? rDiffB : rDiffR;
			System.out.println(ans);
			return;
		}
	}

	public static int readInt(BufferedReader br) throws NumberFormatException, IOException {
		return Integer.parseInt(br.readLine());
	}

	public static long readLong(BufferedReader br) throws NumberFormatException, IOException {
		return Long.parseLong(br.readLine());
	}

	public static int[] readArray(BufferedReader br) throws IOException {
		String[] arr = br.readLine().split(" ");
		int[] a = new int[arr.length];
		for (int i = 0; i < arr.length; i++) {
			a[i] = Integer.parseInt(arr[i]);
		}
		return a;
	}

	public static long[] readLongArray(BufferedReader br) throws IOException {
		String[] arr = br.readLine().split(" ");
		long[] a = new long[arr.length];
		for (int i = 0; i < arr.length; i++) {
			a[i] = Long.parseLong(arr[i]);
		}
		return a;
	}
}
