program main
    implicit none
    integer n
    character(len=10),allocatable, dimension(:) :: s
    integer i,j,c,num,minus,up
    read(*,*) n
    allocate(s(n))

    do i = 1,n
        read(*,*) s(i)
    end do

    num = n
    up = n

    do i = 1,n
        minus = 0
        if(i == up) exit
        do j = i+1,up
            if(s(i) == s(j)) then
                num = num - 1
                minus = minus + 1
            end if
            s(j) = s(j+minus)
        end do
        up = up - minus
    end do

    write(*,*) num

end program