N = int(eval(input()))

S = str(eval(input()))

#print(N,S)



stack = []

while len(S) > 0:

    if len(stack) == 0:

        stack.append(S[0])

        S = S[1:]

    elif S[0] == stack[-1]:

        S = S[1:]

    

    elif S[0] != stack[-1]:

        stack.append(S[0])

        S = S[1:]

    #print(S,stack)

print((len(stack)))

        

N = int(eval(input()))

S = str(eval(input()))

#print(N,S)

count = 0

for i in range(N-1):

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

        count += 1

        

print((count+1))

        
N = int(eval(input()))
S = str(eval(input()))
# print(N,S)
stack = []
while len(S) > 0:
    if len(stack) == 0:
        stack.append(S[0])
        S = S[1:]
    elif S[0] == stack[-1]:
        S = S[1:]
    elif S[0] != stack[-1]:
        stack.append(S[0])
        S = S[1:]
    # print(S,stack)
print((len(stack)))

N = int(eval(input()))
S = str(eval(input()))
# print(N,S)
count = 0
for i in range(N - 1):
    if S[i] != S[i + 1]:
        count += 1
print((count + 1))

-stack = [] -while len(S) > 0: -    if len(stack) == 0: -        stack.append(S[0]) -        S = S[1:] -    elif S[0] == stack[-1]: -        S = S[1:] -    elif S[0] != stack[-1]: -        stack.append(S[0]) -        S = S[1:] -    # print(S,stack) -print((len(stack))) +count = 0 +for i in range(N - 1): +    if S[i] != S[i + 1]: +        count += 1 +print((count + 1))