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

def build_line(first, n):
    elems = ['r', 'b']    
    result = []
    for _ in range(n):
        result.append(elems[first%2])
        first += 1
    return ''.join(result)

def compare_lines(expected, actual):
    red_unordered = 0
    black_unordered = 0
    for i in range(len(actual)):
        if expected[i] != actual[i]:
            if actual[i] == 'r':
                red_unordered += 1
            else:
                black_unordered += 1
    return max(red_unordered, black_unordered)
    
if __name__ == '__main__':
    n = int(input())
    cockroaches = input()
    red_res = compare_lines(build_line(0, n), cockroaches)
    black_res = compare_lines(build_line(1, n), cockroaches)
    print(min(red_res, black_res))