N=int(eval(input()))

S=eval(input())

count=1

for n in range(1,N):

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

        count+=1

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

S=eval(input())

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

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

-count = 1 -for n in range(1, N): -    if S[n] != S[n - 1]: -        count += 1 -print(count) +print((sum(S[n] != S[n - 1] for n in range(1, N)) + 1))