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.StringTokenizer;

public class Main {

    public static void main(String[] args) {
        Reader in = new Reader(System.in);
        PrintWriter out = new PrintWriter(System.out);
        new Main().run(in, out);
        out.close();
    }

    public void run(Reader in, PrintWriter out) {
        int n = in.ni();
        String s = in.rl();
        StringBuilder ss = new StringBuilder();
        StringBuilder sf = new StringBuilder();
        for(int i = 0; i < n; i++) {
            if(i % 2 == 0) {
                ss.append("r");
                sf.append("b");
            } else {
                ss.append("b");
                sf.append("r");
            }
        }
        out.println(Math.min(check(s.toCharArray(), sf.toString().toCharArray()), check(s.toCharArray(), ss.toString().toCharArray())));
    }

    public int check(char[] s, char[] pattern) {
        int sr = calc(s, 'r');
        int sb = calc(s, 'b');
        int pr = calc(pattern, 'r');
        int pb = calc(pattern, 'b');

        int res = 0;
        for(int i = 0; i < s.length; i++) {
            if(s[i] != pattern[i]) {
                if(sr > pr && s[i] != 'r') {
                    s[i] = 'b';
                    res++;
                    sr--;
                } else if(sb > pb && s[i] == 'b') {
                    s[i] = 'r';
                    sb--;
                    res++;
                }
            }
        }
        for(int i = 0; i < s.length; i++) {
            if(s[i] != pattern[i] && s[i] == 'r') {
                res++;
            }
        }
        return res;
    }

    public int calc(char[] s, char ch) {
        int cnt = 0;
        for(int i = 0; i < s.length; i++) {
            if(s[i] == ch) {
                cnt++;
            }
        }
        return cnt;
    }

}


class Reader {
    private BufferedReader in;
    private StringTokenizer st = new StringTokenizer("");
    private String delim = " ";

    public Reader(InputStream in) {
        this.in = new BufferedReader(new InputStreamReader(in));
    }

    public String next() {
        if (!st.hasMoreTokens()) {
            st = new StringTokenizer(rl());
        }
        return st.nextToken(delim);
    }

    public String rl() {
        try {
            return in.readLine();
        } catch(IOException e) {
            throw new RuntimeException(e);
        }
    }

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

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

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

}