n = int(eval(input()))

s = str(eval(input()))



ans = 0

for i in range(n):

  if i == 0:

    ans += 1

  else:

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

      continue

    else:

      ans += 1

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

s = str(eval(input()))



ans = 1

for i in range(1, n):

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

        ans += 1

print(ans)
n = int(eval(input()))
s = str(eval(input()))
ans = 0
for i in range(n):
    if i == 0:
        ans += 1
    else:
        if s[i - 1] == s[i]:
            continue
        else:
            ans += 1
print(ans)

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

-ans = 0 -for i in range(n): -    if i == 0: +ans = 1 +for i in range(1, n): +    if s[i] != s[i - 1]: -    else: -        if s[i - 1] == s[i]: -            continue -        else: -            ans += 1