from sys import stdin,stdout

if __name__=="__main__":

    n=int(stdin.readline())

    s=str(input())

    l=s[0]
    cnt=1

    for i in range(1,len(s)):
        if(s[i]!=l):
            cnt+=1
            l=s[i]

    stdout.write(str(cnt)+"\n") from sys import stdin,stdout if __name__=="__main__":

    n=int(stdin.readline())

    s=str(input())

    l=s[0]
    cnt=1

    for i in range(1,len(s)):
        if(s[i]!=l):
            cnt+=1
            l=s[i]

    stdout.write(str(cnt)+"\n") __name__=="__main__" __name__ "__main__" n=int(stdin.readline()) n int(stdin.readline()) int stdin.readline() stdin.readline stdin readline s=str(input()) s str(input()) str input() input l=s[0] l s[0] s 0 cnt=1 cnt 1 for i in range(1,len(s)):
        if(s[i]!=l):
            cnt+=1
            l=s[i]

     i range(1,len(s)) range 1 len(s) len s if(s[i]!=l):
            cnt+=1
            l=s[i]

     s[i]!=l s[i] s i l cnt+=1 cnt 1 l=s[i] l s[i] s i stdout.write(str(cnt)+"\n") stdout.write stdout write str(cnt)+"\n" str(cnt) str cnt "\n" cnt=1 1 cnt n=int(stdin.readline()) int(stdin.readline()) n l=s[0] s[0] l l=s[i] s[i] l cnt+=1 1 cnt s=str(input()) str(input()) s
from sys import stdin,stdout

if __name__=="__main__":

    n=int(stdin.readline())

    s=str(input())

    l=s[0]
    cnt=1

    for i in range(1,len(s)):
        if(s[i]!=l):
            cnt+=1
            l=s[i]

    stdout.write(str(cnt)+"\n")
