n = int(eval(input()))

s = str(eval(input()))

slist = []

for i in range(n):

  slist.append(s[i])

slime = slist[0]

count = 1

for i in range(1, n):

  if slime != slist[i]:

    count += 1

    slime = slist[i]

print(count)
n = int(eval(input()))

s = str(eval(input()))

slime = s[0]

count = 1

for i in range(1, n):

  if slime != s[i]:

    count += 1

    slime = s[i]

print(count)
n = int(eval(input()))
s = str(eval(input()))
slist = []
for i in range(n):
    slist.append(s[i])
slime = slist[0]
count = 1
for i in range(1, n):
    if slime != slist[i]:
        count += 1
        slime = slist[i]
print(count)

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

-slist = [] -for i in range(n): -    slist.append(s[i]) -slime = slist[0] +slime = s[0] -    if slime != slist[i]: +    if slime != s[i]: -        slime = slist[i] +        slime = s[i]