N = int(eval(input()))

S = list(eval(input()))



i = 0

count = 0

while i < N-1:



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

        i = (i+1)

        continue

    else:

        count = count + 1

    i = i + 1



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

S = list(eval(input()))



sum = 0

for index in range(0, len(S)-1, 1):

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

        sum = sum + 1

        continue

print((sum+1))
N = int(eval(input()))
S = list(eval(input()))
i = 0
count = 0
while i < N - 1:
    if S[i] == S[i + 1]:
        i = i + 1
        continue
    else:
        count = count + 1
    i = i + 1
print((count + 1))

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

-i = 0 -count = 0 -while i < N - 1: -    if S[i] == S[i + 1]: -        i = i + 1 +sum = 0 +for index in range(0, len(S) - 1, 1): +    if S[index] != S[index + 1]: +        sum = sum + 1 -    else: -        count = count + 1 -    i = i + 1 -print((count + 1)) +print((sum + 1))