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

#!/usr/bin/python

import sys

n = int(raw_input())
cockroach = raw_input()
# c1 = ""
# c2 = ""
c1_pattern = 'rb'
c2_pattern = 'br'
rb_r_in_b = 0
rb_b_in_r = 0
br_r_in_b = 0
br_b_in_r = 0
# b_count = 0
# r_count = 0
# count0_c1 = 0
# count0_c2 = 0
for i in range(n):
	# if cockroach[i]=='b':
	# 	b_count += 1
	# else:
	# 	r_count += 1
	if cockroach[i]!=c1_pattern[i%2]:
	# 	c1 += "0"
	# 	count0_c1 += 1
	# else:
	# 	c1 += "1"
		if c1_pattern[i%2]=='r' and cockroach[i]=='b':
			rb_b_in_r += 1
		else:
			rb_r_in_b += 1
	if cockroach[i]!=c2_pattern[i%2]:
	# 	c2 += "0"
	# 	count0_c2 += 1
	# else:
	# 	c2 += "1"
		if c2_pattern[i%2]=='b' and cockroach[i]=='r':
			br_r_in_b += 1
		else:
			br_b_in_r += 1

print min(max(rb_r_in_b,rb_b_in_r),max(br_r_in_b,br_b_in_r))
# count = 0
# if count0_c1 == n or count0_c2 == n:
# 	print count
# 	sys.exit(0)
# elif count0_c1 > count0_c2:
# 	i = 0
# 	while(i<n):
# 		if c1[i]=='1':
# 			if i+1<n:
# 				if c1[i+1]=='1':
# 					count += 1
# 					i += 2
# 				else:
# 					count += 1
# 					i += 1
# 			else:
# 				count += 1
# 				i += 1
# 		else:
# 			i += 1
# else:
# 	i = 0
# 	while(i<n):
# 		if c2[i]=='1':
# 			if i+1<n:
# 				if c2[i+1]=='1':
# 					count += 1
# 					i += 2
# 				else:
# 					count += 1
# 					i += 1
# 			else:
# 				count += 1
# 				i += 1
# 		else:
# 			i += 1
# print count
# color = 0
# if n%2==0:
# 	if abs(b_count - r_count)!=0:
# 		color = n/2 - min(b_count,r_count)
# else:
# 	if abs(b_count - r_count)!=1:
# 		color = n/2 - min(b_count,r_count)
# i = 0
# swap = 0
# c = 0
# while(i<n):
# 	if i+2<n:
# 		print "end"
# 		if cockroach[i]=='b' and cockroach[i+1]=='b' and cockroach[i+2]=='b':
# 			c += 1
# 			i += 3
# 		elif cockroach[i]=='b' and cockroach[i+1]=='r' and cockroach[i+2]=='b':
# 			i += 3
# 		elif cockroach[i]=='b' and cockroach[i+1]=='r' and cockroach[i+2]=='r':
# 			c += 1
# 			i += 3
# 		elif cockroach[i]=='b' and cockroach[i+1]=='b' and cockroach[i+2]=='r':
# 			c += 1
# 			i += 3
# 		elif cockroach[i]=='r' and cockroach[i+1]=='r' and cockroach[i+2]=='r':
# 			c += 1
# 			i += 3
# 		elif cockroach[i]=='r' and cockroach[i+1]=='b' and cockroach[i+2]=='r':
# 			i += 3
# 		elif cockroach[i]=='r' and cockroach[i+1]=='b' and cockroach[i+2]=='b':
# 			c += 1
# 			i += 3
# 		elif cockroach[i]=='r' and cockroach[i+1]=='r' and cockroach[i+2]=='r':
# 			c += 1
# 			i += 3
# 	else:
# 		i+=3

# if i+1<n:
# 	if cockroach[-3] == 'b':
# 		if cockroach[i]!='r' and cockroach[i+1]!='b':
# 			color+=1
# 	if cockroach[-3] == 'r':
# 		if cockroach[i]!='b' and cockroach[i+1]!='r':
# 			color+=1
# if cockroach[-2]=='b':
# 	if cockroach[-1]!='r':
# 		c+=1
# if cockroach[-2]=='r':
# 	if cockroach[-1]!='b':
# 		c+=1

# print c+swap