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(input())
s = input()
# check how many b and r are not in position
# max of that will be required for the change
# min of that will go in the swap part and the rest will go in painting part
sb,sr = 0,0
# for brbrbr.....
for i in range(0,n):
    if i%2 and s[i] != 'b':
        sb += 1
    if not i%2 and s[i] != 'r':
        sr += 1
maxx = max(sr,sb)
sr,sb = 0,0
# for rbrbrbr....
for i in range(0,n):
    if i%2 and s[i] != 'r':
        sr += 1
    if not i%2 and s[i] != 'b':
        sb += 1
maxx1 = max(sr,sb)
print(min(maxx,maxx1))