n = int(eval(input()))

s = list(eval(input()))

ans = s[0]



for x in s:

  if x != ans[-1]:

    ans += x



print((len(ans)))
n = int(eval(input()))

s = eval(input())

list1 = [s[0]]



for x in s:

  if x != list1[-1]:

    list1.append(x)

    

print((len(list1)))
n = int(eval(input()))
s = list(eval(input()))
ans = s[0]
for x in s:
    if x != ans[-1]:
        ans += x
print((len(ans)))

n = int(eval(input()))
s = eval(input())
list1 = [s[0]]
for x in s:
    if x != list1[-1]:
        list1.append(x)
print((len(list1)))

-s = list(eval(input())) -ans = s[0] +s = eval(input()) +list1 = [s[0]] -    if x != ans[-1]: -        ans += x -print((len(ans))) +    if x != list1[-1]: +        list1.append(x) +print((len(list1)))