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

public class b {
    void swap(char[] s, int i, int j) {
        char t = s[i];
        s[i] = s[j];
        s[j] = t;
    }

    int count(char start, char[] line) {
        int n = line.length, r = 0;
        char other = start == 'r' ? 'b' : 'r';

        int s = 0, o = 0;
        for (int i = 0; i < n; ++i) {
            if (i % 2 == 0 && start != line[i]) {
                s += 1;
            } else if (i % 2 != 0 && other != line[i]) {
                o += 1;
            }
        }
        return Math.max(s, o);
    }
    private void solve() throws IOException {
        int n = nextInt();
        char[] line = next().toCharArray();

        //debug(count('b', line));
        //debug(count('r', line));
        System.out.println(Math.min(count('b', line), count('r', line)));
    }

    static void debug(Object...o) {
        System.err.println(Arrays.deepToString(o));
    }

    BufferedReader br;
    StringTokenizer st;
    PrintWriter out;

    String next() throws IOException {
        while (st == null || !st.hasMoreTokens()) {
            String s = br.readLine();
            if(s != null) {
                st = new StringTokenizer(s);
            }
        }
        if(st.hasMoreTokens()) {
            return st.nextToken();
        } else {
            return null;
        }
    }

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

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

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

    String nextLine(){
        String str = "";
        try {
            str = br.readLine();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return str;
    }

    private void run() throws IOException {
        br = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
        solve();
        out.close();
    }

    public static void main(String[] args) throws IOException {
        new b().run();
    }
}
