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.*;
import java.util.*;

public class B {
	
	public B() {
		Scanner s = new Scanner();
		int n = s.nextInt();
		String str = s.next();
		
		int wrongOdd = 0;
		int wrongEven = 0;
		int min = Integer.MAX_VALUE;
		for (int i = 0; i < str.length(); i++) {
			if (i % 2 == 0) {
				if (str.charAt(i) == 'b') {
					wrongEven++;
				}
			}
			if (i % 2 != 0) {
				if (str.charAt(i) == 'r') {
					wrongOdd++;;
				}
			}
			
		}
		int mm = Integer.min(wrongOdd, wrongEven);
		int score = mm + wrongOdd - mm + wrongEven - mm;
		min = Integer.min(score, min);
		System.err.println(score);
		wrongOdd = 0;
		wrongEven = 0;
		
		for (int i = 0; i < str.length(); i++) {
			if (i % 2 == 0) {
				if (str.charAt(i) == 'r') {
					wrongEven++;
				}
			}
			if (i % 2 != 0) {
				if (str.charAt(i) == 'b') {
					wrongOdd++;;
				}
			}
			
		}
		mm = Integer.min(wrongOdd, wrongEven);
		score = mm + wrongOdd - mm + wrongEven - mm;
		min = Integer.min(score, min);
		System.err.println(score);
		System.out.println(min);
		
	}
	
	
	public static void main(String[] args) {
		new B();
	}
	
	public static class Scanner {
		BufferedReader br;
		StringTokenizer st;

		public Scanner(Reader in) {
			br = new BufferedReader(in);
		}

		public Scanner() {
			this(new InputStreamReader(System.in));
		}

		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

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

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

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

		// Slightly different from java.util.Scanner.nextLine()
		String readNextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}

		public int[] readNextLineInts(int numberOfInts) {
			int[] ints = new int[numberOfInts];
			for (int i = 0; i < numberOfInts; i++)
				ints[i] = nextInt();
			return ints;
		}
		
		public double[] readNextLineDoubles(int numberOfDoubles) {
			double[] doubles = new double[numberOfDoubles];
			for (int i = 0; i < numberOfDoubles; i++)
				doubles[i] = nextDouble();
			return doubles;
		}
		// --------------------------------------------------------
	}
}
