def resolve():
    
    N=int(input())
    S=list((input()))
    ans=S[0]

    for i in range(N-1):
        if(S[i]!=S[i+1]):
            ans+=S[i+1]

    print(len(ans))        


resolve() def resolve():
    
    N=int(input())
    S=list((input()))
    ans=S[0]

    for i in range(N-1):
        if(S[i]!=S[i+1]):
            ans+=S[i+1]

    print(len(ans))         resolve N=int(input()) N int(input()) int input() input S=list((input())) S list((input())) list input() input ans=S[0] ans S[0] S 0 for i in range(N-1):
        if(S[i]!=S[i+1]):
            ans+=S[i+1]

     i range(N-1) range N-1 N 1 if(S[i]!=S[i+1]):
            ans+=S[i+1]

     S[i]!=S[i+1] S[i] S i S[i+1] S i+1 i 1 ans+=S[i+1] ans S[i+1] S i+1 i 1 print(len(ans)) print len(ans) len ans resolve() resolve def resolve():
    
    N=int(input())
    S=list((input()))
    ans=S[0]

    for i in range(N-1):
        if(S[i]!=S[i+1]):
            ans+=S[i+1]

    print(len(ans))         def resolve():
    
    N=int(input())
    S=list((input()))
    ans=S[0]

    for i in range(N-1):
        if(S[i]!=S[i+1]):
            ans+=S[i+1]

    print(len(ans))         resolve
def resolve():
    
    N=int(input())
    S=list((input()))
    ans=S[0]

    for i in range(N-1):
        if(S[i]!=S[i+1]):
            ans+=S[i+1]

    print(len(ans))        


resolve()