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.InputStreamReader;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;
import java.math.BigInteger;
/**
 *
 * Yerasyl Abenov 
 *
 */
public class Main {
    public static void main(String[] args) throws IOException {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        //try (PrintWriter out = new PrintWriter(new File("figures.out"))) {
        try (PrintWriter out = new PrintWriter(outputStream)) {
            TaskB solver = new TaskB();
            solver.solve(1, in, out);
        }
    }
}
class TaskB {
    public void solve(int testNumber, InputReader in, PrintWriter out) throws FileNotFoundException, IOException {
        int n = in.nextInt();
        String s = in.next();
        int b1 = 0;
        int r1 = 0;
        int b2 = 0;
        int r2 = 0;
        for (int i = 0; i < n; ++i) {
            if (i%2 == 0) {
                if (s.charAt(i) == 'b') r1++;
                else r2++;
            }
            else {
                if (s.charAt(i) == 'r') b1++;
                else b2++;
            }
        }
        int a1 = Math.max(r1, b1);
        int a2 = Math.max(r2, b2);
        out.println(Math.min(a1, a2));
    }
}
class InputReader {
    private final BufferedReader reader;
    private StringTokenizer tokenizer;
    public InputReader(InputStream stream) throws FileNotFoundException {
        //reader = new BufferedReader(new FileReader("figures.in"));
        reader = new BufferedReader(new InputStreamReader(stream));
        tokenizer = null;
    }


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

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            tokenizer = new StringTokenizer(nextLine());
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }
    public long nextLong() {
        return Long.valueOf(next());
    }
    public BigInteger nextBigInteger() {
        return new BigInteger(next());
    }
}