N = int(eval(input()))

S = eval(input())



l = list(S)



i = 0

while i < len(l) - 1:

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

        i += 1

        continue

    del l[i]



print((len(l)))

N = int(eval(input()))

S = eval(input())



ans = 1

for i in range(N - 1):

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

        ans += 1



print(ans)

N = int(eval(input()))
S = eval(input())
l = list(S)
i = 0
while i < len(l) - 1:
    if l[i] != l[i + 1]:
        i += 1
        continue
    del l[i]
print((len(l)))

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

-l = list(S) -i = 0 -while i < len(l) - 1: -    if l[i] != l[i + 1]: -        i += 1 -        continue -    del l[i] -print((len(l))) +ans = 1 +for i in range(N - 1): +    if S[i] != S[i + 1]: +        ans += 1 +print(ans)