n=int(eval(input()))

s=str(eval(input()))

for i in range(n-1):

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

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

print((len(s.replace('X', ''))))
n=int(eval(input()))

s=eval(input())

li=""

li+=s[0]

for i in range(n):

    if i>0 and s[i]!=s[i-1]:

        li+=s[i]

print((len(li)))
n = int(eval(input()))
s = str(eval(input()))
for i in range(n - 1):
    if s[i] == s[i + 1]:
        s = s[:i] + "X" + s[i + 1 :]
print((len(s.replace("X", ""))))

n = int(eval(input()))
s = eval(input())
li = ""
li += s[0]
for i in range(n):
    if i > 0 and s[i] != s[i - 1]:
        li += s[i]
print((len(li)))

-s = str(eval(input())) -for i in range(n - 1): -    if s[i] == s[i + 1]: -        s = s[:i] + "X" + s[i + 1 :] -print((len(s.replace("X", "")))) +s = eval(input()) +li = "" +li += s[0] +for i in range(n): +    if i > 0 and s[i] != s[i - 1]: +        li += s[i] +print((len(li)))