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 dist(s, choice):
    r_diff = 0
    b_diff = 0
    for i in range(len(s)):
        if choice[i] != s[i]:
            if s[i] == 'r':
                r_diff += 1
            else:
                b_diff += 1
    min_diff = min(r_diff, b_diff)
    return min_diff + (r_diff - min_diff) + (b_diff - min_diff)


if __name__ == '__main__':
    n = int(input())
    a = list(input())
    choice_one = []
    choice_two = []
    for i in range(len(a)):
        if i % 2 == 0:
            choice_one.append('r')
            choice_two.append('b')
        else:
            choice_one.append('b')
            choice_two.append('r')
    print(min(dist(a, choice_one), dist(a, choice_two)))
