n = int(input())
s = input()
flg = True
pre = '1'
cnt = 0
for c in s:
	if c != pre:
		cnt += 1
		pre = c
print (cnt) n = int(input()) n int(input()) int input() input s = input() s input() input flg = True flg True pre = '1' pre '1' cnt = 0 cnt 0 for c in s:
	if c != pre:
		cnt += 1
		pre = c c s if c != pre:
		cnt += 1
		pre = c c != pre c pre cnt += 1 cnt 1 pre = c pre c print (cnt) print cnt n = int(input()) int(input()) n cnt = 0 0 cnt flg = True True flg s = input() input() s pre = '1' '1' pre pre = c c pre cnt += 1 1 cnt
n = int(input())
s = input()
flg = True
pre = '1'
cnt = 0
for c in s:
	if c != pre:
		cnt += 1
		pre = c
print (cnt)