N=int(eval(input()))

S=eval(input())

T=S[0]

for i in range(1,N):

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

        T+=S[i]

print((len(T)))
N=int(eval(input()))

S=eval(input())

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

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

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