N = int(eval(input()))

S = eval(input())



ans = 1

for i in range(1, N):

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

        ans += 1



print(ans)

N=int(eval(input()))

S=eval(input())

S=[i for i in range(N) if i==0 or S[i]!=S[i-1]]

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

N = int(eval(input()))
S = eval(input())
S = [i for i in range(N) if i == 0 or S[i] != S[i - 1]]
print((len(S)))

-ans = 1 -for i in range(1, N): -    if S[i] != S[i - 1]: -        ans += 1 -print(ans) +S = [i for i in range(N) if i == 0 or S[i] != S[i - 1]] +print((len(S)))