N=int(eval(input()))

S=eval(input())

count=0

a=""



for i in range(N):

   if a!=S[i]:

      a=S[i]

      count+=1

print(count)
def main():

    N=int(eval(input()))

    S=eval(input())

    c=1

    for i in range(N):

        if i==0:

            s=S[i]

        else:

            if s==S[i]:

                pass

            else:

                s=S[i]

                c+=1

    print(c)

if __name__=="__main__":

    main()
N = int(eval(input()))
S = eval(input())
count = 0
a = ""
for i in range(N):
    if a != S[i]:
        a = S[i]
        count += 1
print(count)

def main():
    N = int(eval(input()))
    S = eval(input())
    c = 1
    for i in range(N):
        if i == 0:
            s = S[i]
        else:
            if s == S[i]:
                pass
            else:
                s = S[i]
                c += 1
    print(c)


if __name__ == "__main__":
    main()

-N = int(eval(input())) -S = eval(input()) -count = 0 -a = "" -for i in range(N): -    if a != S[i]: -        a = S[i] -        count += 1 -print(count) +def main(): +    N = int(eval(input())) +    S = eval(input()) +    c = 1 +    for i in range(N): +        if i == 0: +            s = S[i] +        else: +            if s == S[i]: +                pass +            else: +                s = S[i] +                c += 1 +    print(c) + + +if __name__ == "__main__": +    main()