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

/**
 * Created by iainws on 30/09/16.
 */

import java.io.InputStreamReader;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.InputStream;

public class Cockroaches {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReaderCockroaches in = new InputReaderCockroaches(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskCockroaches solver = new TaskCockroaches();
        solver.solve(1, in, out);
        out.close();
    }
}

class TaskCockroaches {
    public void solve(int taskNumber, InputReaderCockroaches in, PrintWriter out) {
        int n = in.nextInt();
        String s = in.next();
        int a, b, A, B;
        a = b = A = B = 0;
        for(int i = 0; i < n; ++i){
            if(i % 2 == 0 && s.charAt(i) == 'r'){
                a++;
            }
            if(i % 2 == 1 && s.charAt(i) == 'b'){
                b++;
            }
            if(i % 2 == 0 && s.charAt(i) == 'b'){
                B++;
            }
            if(i % 2 == 1 && s.charAt(i) == 'r'){
                A++;
            }
        }
        int first = Math.min(a, b) + Math.max(a, b) - Math.min(a, b);
        int second = Math.min(A, B) + Math.max(A, B) - Math.min(A, B);
        System.out.println(Math.min(first, second));
    }
}

class InputReaderCockroaches {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReaderCockroaches(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream), 32768);
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

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

}