n = int(eval(input()))

s = eval(input())



tempchar = s[0]

ans = n

for i in range(1, n):

	if(tempchar == s[i]):

		ans -= 1

	else:

		tempchar = s[i]



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

s = eval(input())



tempchar = ""

ans = n

for c in s:

	if(tempchar == c):

		ans -= 1

	else:

		tempchar = c



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

n = int(eval(input()))
s = eval(input())
tempchar = ""
ans = n
for c in s:
    if tempchar == c:
        ans -= 1
    else:
        tempchar = c
print(ans)

-tempchar = s[0] +tempchar = "" -for i in range(1, n): -    if tempchar == s[i]: +for c in s: +    if tempchar == c: -        tempchar = s[i] +        tempchar = c