! 2019.10.19
!
      program answer
      implicit none
      integer :: N
      character(len=1),allocatable,dimension(:) :: S
      integer :: ans
      integer :: i
!
      read(*,*) N
      allocate(S(N))
      read(*,'(100000A)') (S(i),i=1,N)
!
      ans = N
!
      do i=1,N-1
        if(S(i) == S(i+1)) then
          ans = ans - 1
        end if
      end do
!
      write(*,*) ans
      end program answer
