import copy



N = int(eval(input()))

S = list(eval(input()))

l = copy.deepcopy(S)



for i in range(N-1):

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

    l[i]=0

  

l_=[i for i in l if i!=0]

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

S=list(eval(input()))

cnt=0

for i in range(N-1):

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

    cnt+=1

    

print((len(S)-cnt))
import copy

N = int(eval(input()))
S = list(eval(input()))
l = copy.deepcopy(S)
for i in range(N - 1):
    if S[i] == S[i + 1]:
        l[i] = 0
l_ = [i for i in l if i != 0]
print((len(l_)))

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

-import copy - -l = copy.deepcopy(S) +cnt = 0 -        l[i] = 0 -l_ = [i for i in l if i != 0] -print((len(l_))) +        cnt += 1 +print((len(S) - cnt))