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.StringTokenizer;
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {

	static class Task {

		public void solve(InputReader in, PrintWriter out) {

			int x = in.nextInt();
			char[] arr = new char[x];

			String str = in.nextLine();
			for (int i = 0; i < x; i++) {
				arr[i] = str.charAt(i);
			}

			int firstBniye = getFirstB(arr);
			int firstBproblem = getFirstBproblem(firstBniye, x);
			int seconRniye = getSecondR(arr);
			int secondRproblme = getSecondRproblme(seconRniye, x);

			int ans1 = Math.max(firstBproblem, secondRproblme);

			int firstRniye = getFirstR(arr);
			int firstRproblem = getFirstRproblem(firstRniye, x);
			int seconBniye = getSecondB(arr);
			int secondBproblme = getSecondBproblme(seconBniye, x);

			int ans2 = Math.max(firstRproblem, secondBproblme);

			int ans = Math.min(ans1, ans2);
			out.println(ans);

		}

		private int getSecondBproblme(int seconBniye, int x) {
			int totalHobe = x / 2;
			return totalHobe - seconBniye;
		}

		private int getSecondB(char[] arr) {
			int x = 0;
			for (int i = 1; i < arr.length; i += 2) {
				if (arr[i] == 'b') {
					x++;
				}
			}
			return x;
		}

		private int getFirstRproblem(int firstRniye, int x) {
			int totalHobe = x / 2;
			if (x % 2 == 1) {
				totalHobe++;
			}
			return totalHobe - firstRniye;
		}

		private int getFirstR(char[] arr) {
			int x = 0;
			for (int i = 0; i < arr.length; i += 2) {
				if (arr[i] == 'r') {
					x++;
				}
			}
			return x;
		}

		private int getSecondRproblme(int seconRniye, int x) {
			int totalHobe = x / 2;
			return totalHobe - seconRniye;
		}

		private int getSecondR(char[] arr) {
			int x = 0;
			for (int i = 1; i < arr.length; i += 2) {
				if (arr[i] == 'r') {
					x++;
				}
			}
			return x;
		}

		private int getFirstBproblem(int firstBniye, int length) {
			int totalHobe = length / 2;
			if (length % 2 == 1) {
				totalHobe++;
			}
			return totalHobe - firstBniye;
		}

		private int getFirstB(char[] arr) {
			int x = 0;
			for (int i = 0; i < arr.length; i += 2) {
				if (arr[i] == 'b') {
					x++;
				}
			}
			return x;
		}

	}

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

	static class InputReader {
		public BufferedReader reader;
		public StringTokenizer tokenizer;

		public InputReader(InputStream stream) {
			reader = new BufferedReader(new InputStreamReader(stream), 32768);
			tokenizer = null;
		}

		public String next() {
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
			return tokenizer.nextToken();
		}

		public int nextInt() {
			return Integer.parseInt(next());
		}

		public double nextDouble() {
			return Double.parseDouble(next());
		}

		public boolean hasNext() {
			if (tokenizer.hasMoreTokens()) {
				return true;
			} else {
				return false;
			}
		}

		public long nextLong() {
			return Long.parseLong(next());
		}

		public String nextLine() {
			String str = null;
			try {
				str = reader.readLine();
			} catch (Exception e) {
				// TODO: handle exception
			}
			return str;

		}

	}
}