n = int(eval(input()))

s = eval(input())

a = s[0]

b = s[0]

for i in range(n):

	if b != s[i]:

		b = s[i]

		a += s[i]

print((len(a)))

n = int(eval(input()))

s = eval(input())

a = []

ss = list(s)

old = ""

ans = ""

for i in ss:

	if old != i:

		ans += i

		old = i

print((len(ans)))
n = int(eval(input()))
s = eval(input())
a = s[0]
b = s[0]
for i in range(n):
    if b != s[i]:
        b = s[i]
        a += s[i]
print((len(a)))

n = int(eval(input()))
s = eval(input())
a = []
ss = list(s)
old = ""
ans = ""
for i in ss:
    if old != i:
        ans += i
        old = i
print((len(ans)))

-a = s[0] -b = s[0] -for i in range(n): -    if b != s[i]: -        b = s[i] -        a += s[i] -print((len(a))) +a = [] +ss = list(s) +old = "" +ans = "" +for i in ss: +    if old != i: +        ans += i +        old = i +print((len(ans)))