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())
sher = input()
kol1 = 0
kol2 = 0
n_pass1 = False
n_pass2 = False
for ind in range(n):
    if n_pass1:
        n_pass1 = False
        continue

    if ind % 2 == 0:
        if sher[ind] != 'r':
            if ind != n - 1:
                if sher[ind+1] == 'r':
                    kol1 += 1
                    n_pass1 = True
                else:
                    kol1 += 1
            else:
                kol1 += 1
    if ind % 2 == 1:
        print(sher[ind], kol1, "1")
        if sher[ind] != 'b':
            if ind != n - 1:
                if sher[ind+1] == 'b':
                    kol1 += 1
                    n_pass1 = True
                else:
                    kol1 += 1
            else:
                kol1 += 1


for ind in range(n):
    if n_pass2:
        n_pass2 = False
        continue

    if ind % 2 == 0:
        if sher[ind] != 'b':
            if ind != n - 1:
                if sher[ind+1] == 'b':
                    kol2 += 1
                    n_pass2 = True
                else:
                    kol2 += 1
            else:
                kol2 += 1

    if ind % 2 == 1:
        if sher[ind] != 'r':
            if ind != n - 1:
                if sher[ind+1] == 'r':
                    kol2 += 1
                    n_pass2 = True
                else:
                    kol2 += 1
            else:
                kol2 += 1
print(min(kol1, kol2))