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

from collections import defaultdict
def go():
	n = input()
	s = raw_input()
	
	even={'r':0, 'b':0}
	odd={'r':0, 'b':0}
	
	for i in range(n):
		if i%2==0:
			even[s[i]]+=1
		else:
			odd[s[i]]+=1
	o = n/2
	e = n-n/2
	# if even is r
	r_even=0
	swaps = min(even['b'],odd['r'])
	r_even+=swaps
	even['r']+=swaps
	odd['r']-=swaps
	even['b']-=swaps
	odd['b']+=swaps
	r_even+= o-odd['b']
	r_even+= e-even['r']
	b_even=0	

	swaps = min(even['r'],odd['b'])
	b_even+=swaps
	even['r']-=swaps
	odd['r']+=swaps
	even['b']+=swaps
	odd['b']-=swaps
	b_even+=o-odd['r']
	b_even+= e-even['b']
	
	print min(b_even,r_even)


go()
