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.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.StringTokenizer;

public class B {
    
    public static void main(String[] args) throws IOException {
        br = new BufferedReader( new InputStreamReader(System.in) );
        st = new StringTokenizer("");
        sb = new StringBuilder(); 
        
        int n = nxtInt();
        char[] arr = nxtTok().toCharArray();
        
        char[] rb = new char[n];
        char[] br = new char[n];
        char[] minConf = new char[n];
        
        int rbConf = 0;
        int brConf = 0;
        for (int i = 0; i < n;i++) {
        	if (i % 2 == 0) {
        		rb[i] = 'r';
        		br[i] = 'b';
        	} else {
        		rb[i] = 'b';
        		br[i] = 'r';
        	}
        	if (arr[i] != rb[i]) {
        		rbConf++;
        	}
        	if (arr[i] != br[i]) {
        		brConf++;
        	}
        }// end for.
        
        if (rbConf <= brConf) {
        	minConf = rb;
        } else {
        	minConf = br;
        }
        
        // getting reds and blacks:
        int rConf = 0;
        int bConf = 0;
        for (int i = 0; i < n; i++) {
        	if (arr[i] != minConf[i]) {
        		if (arr[i] == 'r') {
        			rConf++;
        		} else {
        			bConf++;
        		}
        	}
        }
        int numOperations = Math.min(rConf, bConf) +  Math.abs(rConf -bConf);
        System.out.println(numOperations);
    }
    
    static BufferedReader br;
    static StringTokenizer st;
    static StringBuilder sb;
    static FileReader fr;

    static String nxtTok() throws IOException {
        while (!st.hasMoreTokens()) {
            String s = br.readLine();
            if (s == null)
                return null;
            st = new StringTokenizer(s.trim());
        }
        return st.nextToken();
    }

    static int nxtInt() throws IOException {
        return Integer.parseInt(nxtTok());
    }

    static long nxtLng() throws IOException {
        return Long.parseLong(nxtTok());
    }

    static double nxtDbl() throws IOException {
        return Double.parseDouble(nxtTok());
    }

    static int[] nxtIntArr(int n) throws IOException {
        int[] a = new int[n];
        for (int i = 0; i < n; i++)
            a[i] = nxtInt();
        return a;
    }

    static long[] nxtLngArr(int n) throws IOException {
        long[] a = new long[n];
        for (int i = 0; i < n; i++)
            a[i] = nxtLng();
        return a;
    }

    static char[] nxtCharArr() throws IOException {
        return nxtTok().toCharArray();
    }       
}