N=int(eval(input()))

S=str(eval(input()))

T=0

for i in range(N-1):

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

        T+=1

print((N-T))
N=int(eval(input()))

S=str(eval(input()))

c=''

t=0

for s in S:

    if s==c:

        t+=1

    c=s

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

N = int(eval(input()))
S = str(eval(input()))
c = ""
t = 0
for s in S:
    if s == c:
        t += 1
    c = s
print((N - t))

-T = 0 -for i in range(N - 1): -    if S[i] == S[i + 1]: -        T += 1 -print((N - T)) +c = "" +t = 0 +for s in S: +    if s == c: +        t += 1 +    c = s +print((N - t))