N=int(eval(input()))

S=str(eval(input()))

c=''

t=0

for s in S:

    if s==c:continue

    t+=1

    c=s

print(t)
def T():

    N=int(eval(input()))

    S=eval(input())

    c=''

    t=0

    for s in S:

        if s==c:

            t+=1

        c=s

    return(N-t)

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

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


print((T()))

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