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


public class B374{

	public static void main(String[] args) {
		InputReader in = new InputReader(System.in);
		OutputWriter out = new OutputWriter(System.out);
		int n = in.readInt();
		int j  = 0;
		String s = in.readString();
		char num[] = new char[n];
		while(j < n){
			num[j] = s.charAt(j);
			j++;
		}
		int count1 = 0;
		int count2 = 0;
		int temp1 = 0,temp2= 0,temp3 = 0,temp4 = 0;
		j =0;
		int i = 0;
		while(j < n){
			if(i % 2 == 0){
				if(num[j] == 'b'){
					temp1++;
					count1++;
				}
			}else{
				if(num[j] == 'r'){
					count1++;
					temp2++;
				}
			}
			i++;
			j++;
		}
		j = 0;
		i = 0;
		while(j < n){
			if(i % 2 == 0){
				if(num[j] == 'r'){
					count2++;
					temp3++;
				}
			}else{
				if(num[j] == 'b'){
					count2++;
					temp4++;
				}
			}
			i++;
			j++;
		}
		out.printLine(Math.min(count1 - Math.min(temp1, temp2), count2 - Math.min(temp3, temp4)));
		out.close();
	}


private static class InputReader {
		private InputStream stream;
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;
 
		public InputReader(InputStream stream) {
			this.stream = stream;
		}
 
		public int read() {
			if (numChars == -1)
				throw new InputMismatchException();
			if (curChar >= numChars) {
				curChar = 0;
				try {
					numChars = stream.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (numChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}
 
		public long readLong() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			long sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			long res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}
 
		public int readInt() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			int res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}
 
		public String readString() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuffer res = new StringBuffer();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isSpaceChar(c));
			return res.toString();
		}
 
		static boolean isSpaceChar(int c) {
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}
 
		public String next() {
			return readString();
		}
	}
 
	private static class OutputWriter {
		private final PrintWriter writer;
 
		public OutputWriter(OutputStream outputStream) {
			writer = new PrintWriter(outputStream);
		}
 
		public OutputWriter(Writer writer) {
			this.writer = new PrintWriter(writer);
		}
 
		public void print(Object... objects) {
			for (int i = 0; i < objects.length; i++) {
				if (i != 0)
					writer.print(' ');
				writer.print(objects[i]);
			}
		}
 
		public void printLine(Object... objects) {
			print(objects);
			writer.println();
		}
 
		public void close() {
			writer.close();
		}
	}
}