N = int(eval(input()))

s = eval(input())



temp = s[0]

i = 1

while i < len(s):

  if s[i] == temp:

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

  else:

    temp = s[i]

    i += 1

    

print((len(s)))

N = int(eval(input()))

s = eval(input())

cnt = 1

for i in range(1,N):

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

    cnt += 1

print(cnt)

N = int(eval(input()))
s = eval(input())
temp = s[0]
i = 1
while i < len(s):
    if s[i] == temp:
        s = s[:i] + s[i + 1 :]
    else:
        temp = s[i]
        i += 1
print((len(s)))

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

-temp = s[0] -i = 1 -while i < len(s): -    if s[i] == temp: -        s = s[:i] + s[i + 1 :] -    else: -        temp = s[i] -        i += 1 -print((len(s))) +cnt = 1 +for i in range(1, N): +    if s[i] != s[i - 1]: +        cnt += 1 +print(cnt)