N = int(eval(input()))

r = 0

S = ''

for s in list(eval(input())):

    if S != s:

        r += 1

    S = s

print(r)
N = int(eval(input()))

r = 0

S = ''

for s in list(eval(input())):

    if S != s:

        r += 1

        S = s

print(r)
N = int(eval(input()))
r = 0
S = ""
for s in list(eval(input())):
    if S != s:
        r += 1
    S = s
print(r)

N = int(eval(input()))
r = 0
S = ""
for s in list(eval(input())):
    if S != s:
        r += 1
        S = s
print(r)

-    S = s +        S = s