N = int(eval(input()))

S = eval(input())

#print(S)

cnt = 1

S_list = [s for s in S]

#print(S_list)

for i in range(N):

    if S_list[N-1-i] != S_list[N-1-(i+1)] and N-1-(i+1)>=0:

        #S_list.insert(N-1-i,"|")

        cnt += 1

    #print(S_list)

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

S = eval(input())

#print(S)

cnt = 1

S_list = [s for s in S]

S_list1 = S_list[1:]

for s,s1 in zip(S_list,S_list1):

    if s != s1:

        cnt += 1

print(cnt)
N = int(eval(input()))
S = eval(input())
# print(S)
cnt = 1
S_list = [s for s in S]
# print(S_list)
for i in range(N):
    if S_list[N - 1 - i] != S_list[N - 1 - (i + 1)] and N - 1 - (i + 1) >= 0:
        # S_list.insert(N-1-i,"|")
        cnt += 1
    # print(S_list)
print(cnt)

N = int(eval(input()))
S = eval(input())
# print(S)
cnt = 1
S_list = [s for s in S]
S_list1 = S_list[1:]
for s, s1 in zip(S_list, S_list1):
    if s != s1:
        cnt += 1
print(cnt)

-# print(S_list) -for i in range(N): -    if S_list[N - 1 - i] != S_list[N - 1 - (i + 1)] and N - 1 - (i + 1) >= 0: -        # S_list.insert(N-1-i,"|") +S_list1 = S_list[1:] +for s, s1 in zip(S_list, S_list1): +    if s != s1: -    # print(S_list)