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.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import static java.lang.Integer.parseInt;
import static java.lang.Math.*;
import java.math.*;
import java.util.*;

public class Main {

    public static void main(String[] args) throws IOException {
        // Scanner in = new Scanner(System.in);  
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
       // StringBuilder out = new StringBuilder();
        //   StringTokenizer tk;

        int n = parseInt(in.readLine());
        String s = in.readLine();
      
        int c = 0;
        int cc = 0;
        int o = 0;
        int oo = 0;
        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) == 'r') {
                o++;
            } else {
                oo++;
            }
        }
        c += Math.ceil(Math.abs(oo - o) / 2);
        cc += Math.ceil(Math.abs(oo - o) / 2);

        for (int i = 0; i < s.length(); i++) {
            if (i % 2 == 0) {
               
                if ('r' != s.charAt(i)) {
                    c++;
                } else if('b'!=s.charAt(i)) {
                    cc++;
                }
            } else {
              
                  if ('b' != s.charAt(i)) {
                    c++;
                } else if('r'!=s.charAt(i)) {
                    cc++;
                }
            }
           
        }

        System.out.println(Math.min((int) Math.ceil(cc / 2.0), (int) Math.ceil(c / 2.0)));
    }

    static void permute(int start, int[] input, int[][] arr, ArrayList ar) {
        if (start == input.length) {
            //System.out.println(input);

            return;
        }
        for (int i = start; i < input.length; i++) {

            int temp = input[i];
            input[i] = input[start];
            input[start] = temp;

            permute(start + 1, input, arr, ar);

            int temp2 = input[i];
            input[i] = input[start];
            input[start] = temp2;
        }
    }

    static boolean isPrime(long n) {
        if (n < 2) {
            return false;
        }
        if (n == 2 || n == 3) {
            return true;
        }
        if (n % 2 == 0 || n % 3 == 0) {
            return false;
        }
        long sqrtN = (long) Math.sqrt(n) + 1;
        for (long i = 6L; i <= sqrtN; i += 6) {
            if (n % (i - 1) == 0 || n % (i + 1) == 0) {
                return false;
            }
        }
        return true;
    }

    static int prime(int p) {
        int t = (int) sqrt(Integer.parseInt(p + ""));
        if (t <= 1) {
            return 0;
        }
        for (long i = 2; i <= t; i++) {
            if (p % i == 0) {
                return 0;
            }

        }
        return 1;
    }

    static int Obe(long a, long b) {
        BigInteger b1 = new BigInteger("" + a);
        BigInteger b2 = new BigInteger("" + b);
        BigInteger gcd = b1.gcd(b2);
        return gcd.intValue();
    }

    static int che(int[] w) {
        Set<Integer> list = new LinkedHashSet<>();
        for (int i = 0; i < w.length; i++) {
            list.add(w[i]);
        }
        return list.size();
    }

    private static ArrayList<BigInteger> fibCache = new ArrayList<BigInteger>();

    static {
        fibCache.add(BigInteger.ZERO);
        fibCache.add(BigInteger.ONE);
    }

    public static BigInteger fib(int n) {
        if (n >= fibCache.size()) {
            fibCache.add(n, fib(n - 1).add(fib(n - 2)));
        }

        return fibCache.get(n);
    }

}
