n = int(eval(input()))

s = str(eval(input()))

slist = []

for i in range(n):

  slist.append(s[i])

slime = slist[0]

fslist = []

fslist.append(slime)

for i in range(1, n):

  if slime != slist[i]:

    fslist.append(slist[i])

    slime = slist[i]

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

s = str(eval(input()))

slist = []

for i in range(n):

  slist.append(s[i])

slime = slist[0]

count = 1

for i in range(1, n):

  if slime != slist[i]:

    count += 1

    slime = slist[i]

print(count)
n = int(eval(input()))
s = str(eval(input()))
slist = []
for i in range(n):
    slist.append(s[i])
slime = slist[0]
fslist = []
fslist.append(slime)
for i in range(1, n):
    if slime != slist[i]:
        fslist.append(slist[i])
        slime = slist[i]
print((len(fslist)))

n = int(eval(input()))
s = str(eval(input()))
slist = []
for i in range(n):
    slist.append(s[i])
slime = slist[0]
count = 1
for i in range(1, n):
    if slime != slist[i]:
        count += 1
        slime = slist[i]
print(count)

-fslist = [] -fslist.append(slime) +count = 1 -        fslist.append(slist[i]) +        count += 1 -print((len(fslist))) +print(count)