import itertools

n = int(eval(input()))

s = eval(input())

gr = itertools.groupby(s)

print((len(list(gr))))
n = int(eval(input()))

s = eval(input())

ans = 1

for i in range(n-1):

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

        ans += 1

print(ans)
import itertools

n = int(eval(input()))
s = eval(input())
gr = itertools.groupby(s)
print((len(list(gr))))

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

-import itertools - -gr = itertools.groupby(s) -print((len(list(gr)))) +ans = 1 +for i in range(n - 1): +    if s[i] != s[i + 1]: +        ans += 1 +print(ans)