N=int(eval(input()))

S=list(eval(input()))

s=S.copy()

n=0

for i in range(N-1):

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

    del s[i+1-n]

    n+=1

print((len(s)))
N=int(eval(input()))

S=eval(input())

n=0

for i in range(N-1):

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

    n+=1

print((N-n))
N = int(eval(input()))
S = list(eval(input()))
s = S.copy()
n = 0
for i in range(N - 1):
    if S[i] == S[i + 1]:
        del s[i + 1 - n]
        n += 1
print((len(s)))

N = int(eval(input()))
S = eval(input())
n = 0
for i in range(N - 1):
    if S[i] == S[i + 1]:
        n += 1
print((N - n))

-S = list(eval(input())) -s = S.copy() +S = eval(input()) -        del s[i + 1 - n] -print((len(s))) +print((N - n))