N = int(eval(input()))

S = eval(input())

ans = 1

for i in range(0,N-1):

	if S[i] != S[i+1]:

		ans += 1



print(ans)
N=int(eval(input()))

L=eval(input())

count=1

for i in range(N-1):

	if L[i]!=L[i+1]:

		count+=1

print(count)
N = int(eval(input()))
S = eval(input())
ans = 1
for i in range(0, N - 1):
    if S[i] != S[i + 1]:
        ans += 1
print(ans)

N = int(eval(input()))
L = eval(input())
count = 1
for i in range(N - 1):
    if L[i] != L[i + 1]:
        count += 1
print(count)

-S = eval(input()) -ans = 1 -for i in range(0, N - 1): -    if S[i] != S[i + 1]: -        ans += 1 -print(ans) +L = eval(input()) +count = 1 +for i in range(N - 1): +    if L[i] != L[i + 1]: +        count += 1 +print(count)