n = int(eval(input()))

s = [c for c in eval(input())]



for i in range(n-1,0,-1):

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

    s.pop(i)



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

s=eval(input())

a,t=1,s[0]

for i in range(1,n):

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

print(a)
n = int(eval(input()))
s = [c for c in eval(input())]
for i in range(n - 1, 0, -1):
    if s[i] == s[i - 1]:
        s.pop(i)
print((len(s)))

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

-s = [c for c in eval(input())] -for i in range(n - 1, 0, -1): -    if s[i] == s[i - 1]: -        s.pop(i) -print((len(s))) +s = eval(input()) +a, t = 1, s[0] +for i in range(1, n): +    if s[i] != s[i - 1]: +        a += 1 +print(a)