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 math
n = input()
inpStr = raw_input()
t = 0
if n % 2 != 0:
	t = int(n/2)+1
else:
	t = n/2	
countFirst = 0
countSecond = 0	
first = "rb"*t
second = "br"*t
countFirstR = 0
countSecondR = 0
countFirstB = 0
countSecondB =0
for i in range(n):
	if first[i] != inpStr[i]:
		countFirst+=1
		if first[i] == 'b':
			countFirstB+=1
		else:
			countFirstR+=1	
	if second[i] != inpStr[i]:
		countSecond+=1
		if second[i] == 'b':
			countSecondB+=1
		else:
			countSecondR+=1
if countFirst < countSecond:
	if countFirstR == countFirstB:
		print countFirstR
	else:
		if countFirstR < countFirstB:
			print countFirstB
		else:
			print countFirstR			
else:
	if countSecondR == countSecondB:
		print countSecondB
	else:
		if countSecondR < countSecondB:
			print countSecondB
		else:
			print countSecondR		
		