n = int(eval(input()))

s = list(eval(input()))



pointer1 = 0

pointer2 = 1

ans = []

ans.append(s[0])

while (pointer2 <= n-1):

  if s[pointer2] == s[pointer1]:

    pointer2 += 1

  elif s[pointer2] != s[pointer1]:

    pointer1 = pointer2

    pointer2 = pointer1 + 1 

    ans.append(s[pointer1])

    

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

s = list(eval(input()))

count = 1

for i in range(1,n):

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

    count += 1

print(count)

n = int(eval(input()))
s = list(eval(input()))
pointer1 = 0
pointer2 = 1
ans = []
ans.append(s[0])
while pointer2 <= n - 1:
    if s[pointer2] == s[pointer1]:
        pointer2 += 1
    elif s[pointer2] != s[pointer1]:
        pointer1 = pointer2
        pointer2 = pointer1 + 1
        ans.append(s[pointer1])
print((len(ans)))

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

-pointer1 = 0 -pointer2 = 1 -ans = [] -ans.append(s[0]) -while pointer2 <= n - 1: -    if s[pointer2] == s[pointer1]: -        pointer2 += 1 -    elif s[pointer2] != s[pointer1]: -        pointer1 = pointer2 -        pointer2 = pointer1 + 1 -        ans.append(s[pointer1]) -print((len(ans))) +count = 1 +for i in range(1, n): +    if s[i] != s[i - 1]: +        count += 1 +print(count)