program slimes
    implicit none
    integer :: n, i, cnt = 0
    character(100000) s
    read *, n
    read *, s
    do i = 1, n
        if(s(i:i) .ne. s(i+1:i+1))then
            cnt = cnt + 1
        end if
    end do
    print *, cnt
end program