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

import sys
lines = [x.strip() for x in sys.stdin.readlines()]

# lines = [map(int, line.split()) for line in lines]

arr = list(lines[1])
dif1 = 0
dif2 = 0
es = True
ch = []
for i in range(len(arr)):
	if es:
		ch.append('r')
	else:
		ch.append('b')
	es = not es
for i in range(len(arr)):
	if arr[i] != ch[i]:
		dif1+=1

ch.pop()
ch = ['b'] + ch
for i in range(len(arr)):
	if arr[i] != ch[i]:
		dif2+=1

if dif1 < dif2:
	dif = dif1
	ch.pop()
	ch = ['r'] + ch
	r = len([x for x in ch if x == 'r'])
else:
	dif = dif2
	r = len([x for x in ch if x == 'r'])
pint = abs(len([x for x in arr if x == 'r']) - r)
print pint + (dif - pint)/2