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 getTotalEffort(sequence,oddchar,evenchar) :
	length = len(sequence)
	oddmisplaced = 0
	evenmisplaced =0
	for i in range(length) :
		if(i%2==0 and sequence[i] != evenchar):
			evenmisplaced = evenmisplaced +1
		if(i%2==1 and sequence[i] != oddchar):
			oddmisplaced = oddmisplaced+1
	swaps = min (evenmisplaced,oddmisplaced)
	color = abs (evenmisplaced-oddmisplaced)
	return swaps+color	


n = raw_input()
n = int (n)
sequence = raw_input()
result = min (getTotalEffort(sequence,'r','b'),getTotalEffort(sequence,'b','r'))
print (result)
