n = int(eval(input()))

s = eval(input())



p = s[0]

x = s[0]

for i in range(1, n):

  if x == s[i]:

    continue

  else:

    p += s[i]

    x = s[i]



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

s = eval(input())



t = s[0]

ans = 1

for i in range(1,n):

  if t != s[i]:

    ans += 1

    t = s[i]

print(ans)
n = int(eval(input()))
s = eval(input())
p = s[0]
x = s[0]
for i in range(1, n):
    if x == s[i]:
        continue
    else:
        p += s[i]
        x = s[i]
print((len(p)))

n = int(eval(input()))
s = eval(input())
t = s[0]
ans = 1
for i in range(1, n):
    if t != s[i]:
        ans += 1
        t = s[i]
print(ans)

-p = s[0] -x = s[0] +t = s[0] +ans = 1 -    if x == s[i]: -        continue -    else: -        p += s[i] -        x = s[i] -print((len(p))) +    if t != s[i]: +        ans += 1 +        t = s[i] +print(ans)