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.ArrayList;
import java.util.List;
import java.util.StringTokenizer;

public class B {

    FastScanner scanner;
    PrintWriter writer;

    void solve() throws IOException {
        scanner = new FastScanner(System.in);
        writer = new PrintWriter(System.out);
        int n = scanner.nextInt();
        String s = scanner.nextLine();
        writer.println(Math.min(changes(s, 0), changes(s, 1)));
        writer.close();
    }

    int changes(String s, int d) {
        List<Integer> blacks = getPositions(s, 'b');
        List<Integer> reds = getPositions(s, 'r');
        int lb = 0, lr = 0;
        int changes = 0;
        StringBuilder sb = new StringBuilder(s);
        for (int i = 0; i < sb.length(); i++) {
            char c = sb.charAt(i);
            if ((c == 'r') ^ ((i + d) % 2 == 0)) {
                changes++;
                if (c == 'r') {
                    if (lb < blacks.size()) {
                        int p = blacks.get(lb);
                        sb.setCharAt(p, 'r');
                        lb++;
                    }
                } else {
                    if (lr < reds.size()) {
                        int p = reds.get(lr);
                        sb.setCharAt(p, 'b');
                        lr++;
                    }
                }
            }
            if (lr < reds.size() && reds.get(lr) == i) {
                lr++;
            }
            if (lb < blacks.size() && blacks.get(lb) == i) {
                lb++;
            }
        }
        return changes;
    }

    List<Integer> getPositions(String s, char c) {
        List<Integer> positions = new ArrayList<>();
        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) == c) {
                positions.add(i);
            }
        }
        return positions;
    }

    public static void main(String... args) throws IOException {
        new B().solve();
    }

    static class FastScanner {

        BufferedReader br;
        StringTokenizer tokenizer;

        FastScanner(String fileName) throws FileNotFoundException {
            this(new FileInputStream(new File(fileName)));
        }

        FastScanner(InputStream is) {
            br = new BufferedReader(new InputStreamReader(is));
        }

        String nextLine() throws IOException {
            tokenizer = null;
            return br.readLine();
        }

        String next() throws IOException {
            if (tokenizer == null || !tokenizer.hasMoreTokens()) {
                String line = br.readLine();
                if (line == null) {
                    return null;
                }
                tokenizer = new StringTokenizer(line);
            }
            return tokenizer.nextToken();
        }

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