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

n = int(raw_input())
roaches = [c for c in raw_input()]

num_r = 0
num_b = 0
for c in roaches:
    if c == 'b':
        num_b += 1
    else:
        num_r += 1

num_moves = []

for char1, char2 in [['r', 'b'], ['b', 'r']]:
    if n % 2 == 0:
        num_r_required = n / 2
        num_b_required = n / 2
        desired_string = [char1, char2] * (n/2)
    else:
        num_r_required = n / 2 + 1
        num_b_required = n / 2
        desired_string = [char1, char2] * (n/2) + [char1]

    num_misplaced_r = 0
    num_misplaced_b = 0

    for i in range(len(roaches)):
        if desired_string[i] == 'r' and roaches[i] == 'b':
            num_misplaced_b += 1
        if desired_string[i] == 'b' and roaches[i] == 'r':
            num_misplaced_r += 1

    num_moves.append(max(num_misplaced_r, num_misplaced_b))

print min(num_moves)



