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.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.Reader;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import java.util.StringTokenizer;

public class D {
    public static void main(String[] args) {
//        Scanner sc = new Scanner(System.in);
        FastScanner sc = new FastScanner();

        sc.nextInt();
        String str = sc.next();
        int redFirst = solve(str, 'r');
        int blackFirst = solve(str, 'b');
        System.err.println(redFirst);
        System.err.println(blackFirst);
        System.out.println(Math.min(redFirst, blackFirst));
    }

    static int solve(String str, char firstChar) {
        boolean[] arr = new boolean[str.length()];
        for (int i = 0; i < arr.length; i++) {
            arr[i] = str.charAt(i) == firstChar;
        }
        List<Integer> badTrues = new ArrayList<>();
        List<Integer> badFalses = new ArrayList<>();
        for (int i = 0; i < arr.length; i++) {
            if (i % 2 == 0) { // arr[i] should be true
                if (!arr[i]) {
                    badFalses.add(i);
                }
            } else { // arr[i] should be false
                if (arr[i]) {
                    badTrues.add(i);
                }
            }
        }

        int count = Math.min(badTrues.size(), badFalses.size());
        for (int i = 0; i < Math.min(badTrues.size(), badFalses.size()); i++) {
            arr[badTrues.get(i)] = false;
            arr[badFalses.get(i)] = true;
        }

        for (int i = 0; i < arr.length; i++) {
            if (arr[i] != (i % 2 == 0)) {
                count++;
            }
        }

        return count;
    }

    static void shuffle(int[] arr) {
        Random rng = new Random();
        int length = arr.length;
        for (int idx = 0; idx < arr.length; idx++) {
            int toSwap = idx + rng.nextInt(length-idx);
            int tmp = arr[idx];
            arr[idx] = arr[toSwap];
            arr[toSwap] = tmp;
        }
    }

    public static class FastScanner {
        BufferedReader br;
        StringTokenizer st;
        public FastScanner(Reader in) {
            br = new BufferedReader(in);
        }
        public FastScanner() {
            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());
        }
        String readNextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
        int[] readIntArray(int n) {
            int[] a = new int[n];
            for (int idx = 0; idx < n; idx++) {
                a[idx] = nextInt();
            }
            return a;
        }
        long[] readLongArray(int n) {
            long[] a = new long[n];
            for (int idx = 0; idx < n; idx++) {
                a[idx] = nextLong();
            }
            return a;
        }
    }
}
