program speedrun
    use iso_fortran_env
implicit none
integer::N
character(10**5)::S
integer::ans=1
integer::i
read*,N
read*,S
do i=2,N
    if(S(i:i)/=S(i-1:i-1))ans=ans+1
end do
print"(i0)",ans
end program speedrun