n=int(eval(input()))

s=list(eval(input()))



latest=0

L=[]

for i in range(n):

      if s[i]!=latest:

            L.append(s[i])

            latest=s[i]

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

s=eval(input())



L=[s[0]]

bef=s[0]

for i in s[1:]:

      if i!=bef:

            L.append(i)

      bef=i

print((len(L)))

n = int(eval(input()))
s = list(eval(input()))
latest = 0
L = []
for i in range(n):
    if s[i] != latest:
        L.append(s[i])
        latest = s[i]
print((len(L)))

n = int(eval(input()))
s = eval(input())
L = [s[0]]
bef = s[0]
for i in s[1:]:
    if i != bef:
        L.append(i)
    bef = i
print((len(L)))

-s = list(eval(input())) -latest = 0 -L = [] -for i in range(n): -    if s[i] != latest: -        L.append(s[i]) -        latest = s[i] +s = eval(input()) +L = [s[0]] +bef = s[0] +for i in s[1:]: +    if i != bef: +        L.append(i) +    bef = i