n=int(eval(input()))

s=eval(input())

c=1

for i in range(1,n):

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

        c+=1

print(c)
n = int(eval(input()))

s = eval(input())

ans = 0

prev = ""

for a in s:

    if prev == a:

        continue

    else:

        ans += 1

        prev = a

print(ans)

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

n = int(eval(input()))
s = eval(input())
ans = 0
prev = ""
for a in s:
    if prev == a:
        continue
    else:
        ans += 1
        prev = a
print(ans)

-c = 1 -for i in range(1, n): -    if s[i] != s[i - 1]: -        c += 1 -print(c) +ans = 0 +prev = "" +for a in s: +    if prev == a: +        continue +    else: +        ans += 1 +        prev = a +print(ans)