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.*;
import java.util.*;
import java.math.*;
import static java.lang.Math.*;
import static java.lang.Integer.parseInt;
import static java.lang.Long.parseLong;
import static java.lang.Double.parseDouble;
import static java.lang.String.*;

public class Main {
    
    public static void main(String[] args) throws IOException {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder out = new StringBuilder();
        StringTokenizer tk;
        
        int n = parseInt(in.readLine());
        String s = in.readLine();
        char [] t1 = {'r','b'}, t2 = {'b','r'};
        int ans1=0,ans2=0;
        
        int r=0,b=0;
        
        for(int i=0; i<n; i++) {
                if(s.charAt(i)!=t1[i%2]) {
                    if(t1[i%2]=='r') r++;
                    else b++;
                }
        }
        
        ans1 = min(r,b);
        r -= ans1;
        b -= ans1;
        ans1 += max(r,b);
        
        r = b = 0;
        
        for(int i=0; i<n; i++) {
                if(s.charAt(i)!=t2[i%2]) {
                    if(t2[i%2]=='r') r++;
                    else b++;
                }
        }
        
        ans2 = min(r,b);
        r -= ans2;
        b -= ans2;
        ans2 += max(r,b);
        
        System.out.println(min(ans1,ans2));
    }

}
