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.ByteArrayInputStream;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.util.Scanner;

public class B719 {
	public static void testSet() throws UnsupportedEncodingException {
		String data = "13\r\n" + 
				"rbbbrbrrbrrbb";
		InputStream testInput = new ByteArrayInputStream(data.getBytes("UTF-8"));
		System.setIn(testInput);
	}

	public static void main(String[] args) throws UnsupportedEncodingException {
		//testSet();
		Scanner sc = new Scanner(System.in);
		sc.nextInt();
		String input = sc.next();

		int ob = 0;
		int eb = 0;
		int or = 0;
		int er = 0;

		for (int i = 0; i < input.length(); i++) {
			char c = input.charAt(i);
			if (i % 2 == 0) {
				if (c == 'r')
					er++;
				else
					eb++;
			} else {
				if (c == 'r')
					or++;
				else
					ob++;
			}
		}
		int cc = 0;
		int diff = ob + eb - or - er;
		if (Math.abs(diff) > 1)
			cc = diff / 2;

		if (cc > 0) {
			if (ob > eb) {
				eb -= cc;
				er += cc;
				if (eb < 0) {
					ob += eb;
					or -= eb;
				}
				eb = 0;
			} else if (eb >= ob) {
				ob -= cc;
				or += cc;
				if (ob < 0) {
					eb += ob;
					er -= ob;
				}
				ob = 0;
			}
		} else if (cc < 0) {
			cc = cc * -1;
			if (or > er) {
				er -= cc;
				eb += cc;
				if (er < 0) {
					or += er;
					ob -= er;
				}
				er = 0;
			} else if (er >= or) {
				or -= cc;
				ob += cc;
				if(or<0) {
					er += or;
					eb -= or;
				}
				or = 0;
			}
		}
		int swaps = Math.max(Math.min(or, er), Math.min(ob, eb));
		System.out.println(swaps + cc);
	}
}
