n = int(eval(input()))

s = eval(input())

out = s[0]

x = s[0]

for i in range(1,n):

  if s[i] == x:

    continue

  else:

    out += s[i]

    x = s[i]



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

s = eval(input())



ans = 0

current = ''

for i in s:

  if i != current:

    ans += 1

    current = i



print(ans)
n = int(eval(input()))
s = eval(input())
out = s[0]
x = s[0]
for i in range(1, n):
    if s[i] == x:
        continue
    else:
        out += s[i]
        x = s[i]
print((len(out)))

n = int(eval(input()))
s = eval(input())
ans = 0
current = ""
for i in s:
    if i != current:
        ans += 1
        current = i
print(ans)

-out = s[0] -x = s[0] -for i in range(1, n): -    if s[i] == x: -        continue -    else: -        out += s[i] -        x = s[i] -print((len(out))) +ans = 0 +current = "" +for i in s: +    if i != current: +        ans += 1 +        current = i +print(ans)