N = int(eval(input()))

S = eval(input())



p = ''

result = 0

for i in range(N):

  if p != S[i]:

    result += 1

    p = S[i]

print(result)

N = int(eval(input()))

S = eval(input())



print((sum(1 for i in range(N - 1) if S[i] != S[i + 1]) + 1))

N = int(eval(input()))
S = eval(input())
p = ""
result = 0
for i in range(N):
    if p != S[i]:
        result += 1
        p = S[i]
print(result)

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

-p = "" -result = 0 -for i in range(N): -    if p != S[i]: -        result += 1 -        p = S[i] -print(result) +print((sum(1 for i in range(N - 1) if S[i] != S[i + 1]) + 1))