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 check(ch):
    other = 'r' if ch == 'b' else 'b'
    wrong_ch = 0
    wrong_ot = 0
    for i in range(n):
        if i % 2 != 0 and st[i] == ch:
            wrong_ch += 1
        if i % 2 == 0 and st[i] == other:
            wrong_ot += 1
    # print(wrong_ot, wrong_ch)
    return min(wrong_ot, wrong_ch)

def func():
    tot_r = st.count('r')
    tot_b = st.count('b')
    if tot_r == tot_b:
        ans = check('r')
        print(ans)
        return
    elif tot_r > tot_b:
        ans = check('r')
        print(ans+(tot_r-tot_b)//2)
    else:
        ans = check('b')
        print(ans + (tot_b - tot_r)//2)


n = int(input())
st = list(input())
func()
