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 f():
    raw_input()
    word = raw_input()
    binary_word = [1 if letter == "b" else 0 for letter in word]
    minimo = min(cant_movs(binary_word, 1), cant_movs(binary_word, 0))
    print minimo 
    
def cant_movs(word, first_letter):
    bad_ones = 0
    bad_zeros = 0
    for letter in word:
        if letter != first_letter:
            if letter == 1:
                bad_ones += 1
            else:
                bad_zeros += 1
        first_letter = 1 - first_letter
    ret = max(bad_ones, bad_zeros)
    return ret
    
f()