N = int(eval(input()))

r = 0

S = ''

for s in list(eval(input())):

    if S != s:

        r += 1

        S = s

print(r)
def func():

    N = int(eval(input()))

    r = 0

    S = ''

    for s in list(eval(input())):

        if S != s:

            r += 1

            S = s

    return r

print((func()))
N = int(eval(input()))
r = 0
S = ""
for s in list(eval(input())):
    if S != s:
        r += 1
        S = s
print(r)

def func():
    N = int(eval(input()))
    r = 0
    S = ""
    for s in list(eval(input())):
        if S != s:
            r += 1
            S = s
    return r


print((func()))

-N = int(eval(input())) -r = 0 -S = "" -for s in list(eval(input())): -    if S != s: -        r += 1 -        S = s -print(r) +def func(): +    N = int(eval(input())) +    r = 0 +    S = "" +    for s in list(eval(input())): +        if S != s: +            r += 1 +            S = s +    return r + + +print((func()))