program c1

 implicit none

 integer :: n,i,j,k,l
 character,allocatable :: s(:)*10

 read*,n

 allocate(s(n))

 read*,s

 k=n
 do i=1,n
  do j=1,n-i
   if(s(i+j)==s(i)) s(i+j)='0'
  end do
 end do
  
 do l=1,n
  if(s(l)=='0') k=k-1
 end do

 if(k==0) k=1

 print*,k


end program c1
 
  