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

#http://codeforces.com/problemset/problem/719/B
#solved

n = int(input())
s = input()

red_black = True
swap_red = {"b": 0, "r": 0}
swap_black = {"b": 0, "r": 0}

for c in s:
    if red_black is True and c != "b":
        swap_black["r"] += 1

    elif red_black is False and c != "r":
        swap_black["b"] += 1


    if red_black is True and c != "r":
        swap_red["b"] += 1


    elif red_black is False and c != "b":
        swap_red["r"] += 1


    red_black = True if red_black is False else False

black = (swap_black[max(swap_black, key=swap_black.get)] - swap_black[min(swap_black, key=swap_black.get)]) + swap_black[min(swap_black, key=swap_black.get)]
red = (swap_red[max(swap_red, key=swap_red.get)] - swap_red[min(swap_red, key=swap_red.get)]) + swap_red[min(swap_red, key=swap_red.get)]    

print(int(min(red, black)))
