n = int(eval(input()))

s = eval(input())

l = [s[0]]

for i in range(1,n):

    if s[i-1]!=s[i]:

        l.append(s[i])

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

s = eval(input())

cnt = 1

for i in range(1,n):

    if s[i-1]!=s[i]:

        cnt += 1

print(cnt)
n = int(eval(input()))
s = eval(input())
l = [s[0]]
for i in range(1, n):
    if s[i - 1] != s[i]:
        l.append(s[i])
print((len(l)))

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

-l = [s[0]] +cnt = 1 -        l.append(s[i]) -print((len(l))) +        cnt += 1 +print(cnt)