program ABC142C
    implicit none
    integer:: N,i
    integer:: result=1
    character:: S*100000

    read (5,*) N
    read (5,*) S
    
    do i=1,N-1
        if(S(i:i)/=S(i+1:i+1)) then
            result=result+1
        end if
    end do

    print '(i0)',result
end program ABC142C