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

# print("Input n")
n = int(input())
# print("Input the string")
st = input()

bfirstbwrong = 0
bfirstrwrong = 0
rfirstbwrong = 0
rfirstrwrong = 0

for i in range(len(st)):
    ch = st[i]
    if i%2 == 0:  # Starts with b
        if ch == 'b':
            rfirstbwrong += 1
        else:
            bfirstrwrong += 1
    else:    # Starts with r
        if ch == 'b':
            bfirstbwrong += 1
        else:
            rfirstrwrong += 1

# b first calculation
banswer = max(bfirstbwrong, bfirstrwrong)
ranswer = max(rfirstbwrong, rfirstrwrong)

print(min(banswer, ranswer))


            
    
