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.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author wannabe
 */
public class Main {

	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		Scanner in = new Scanner(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskB solver = new TaskB();
		solver.solve(1, in, out);
		out.close();
	}

	static class TaskB {

		public void solve(int testNumber, Scanner in, PrintWriter out) {
			int n = in.nextInt();
			in.nextLine();
			String input = in.nextLine();

			int x = 0, y = 0;
			int x1 = 0, y1 = 0;
			for (int i = 0; i < n; i++) {
				if (i % 2 != 0 && input.charAt(i) == 'r') {
					x++;
				}
				if (i % 2 == 0 && input.charAt(i) == 'b') {
					y++;
				}

				if (i % 2 != 0 && input.charAt(i) == 'b') {
					x1++;
				}
				if (i % 2 == 0 && input.charAt(i) == 'r') {
					y1++;
				}
			}

			out.print(Math.min(Math.max(x, y), Math.max(x1, y1)));
		}

	}
}

