# coding: utf-8

num = int(eval(input()))

colors = list(eval(input()))

i = 0

while i+1 != len(colors):

  if colors[i] == colors[i+1]:

    colors.pop(i+1)

  else:

    i += 1

print((len(colors)))
# coding: utf-8

num = int(eval(input()))

colors = list(eval(input()))

count = 0



for i in range(num-1):

  if colors[i] != colors[i+1]:

    count += 1

  

print((count+1))
# coding: utf-8
num = int(eval(input()))
colors = list(eval(input()))
i = 0
while i + 1 != len(colors):
    if colors[i] == colors[i + 1]:
        colors.pop(i + 1)
    else:
        i += 1
print((len(colors)))

# coding: utf-8
num = int(eval(input()))
colors = list(eval(input()))
count = 0
for i in range(num - 1):
    if colors[i] != colors[i + 1]:
        count += 1
print((count + 1))

-i = 0 -while i + 1 != len(colors): -    if colors[i] == colors[i + 1]: -        colors.pop(i + 1) -    else: -        i += 1 -print((len(colors))) +count = 0 +for i in range(num - 1): +    if colors[i] != colors[i + 1]: +        count += 1 +print((count + 1))