program main
      implicit none
      integer(4) :: n, i, j, k, length
      character(10), allocatable :: s(:)
      integer(4) :: num(10)
      integer(4) :: cnt
      integer(4), allocatable :: m(:,:)

      num(:) = 0
      read *, n
      allocate( s(n) )
      allocate( m(10,n) )
      m(:,:) = 0
      do i = 1, n
        read *, s(i)
        length = len(trim(s(i)))
        num(length) = num(length) + 1
        m(length, num(length)) = i
      end do

      cnt = 0
      do i = 1, 10
        do j = 1, num(i)
          if (m(i,j) == 0) cycle
          do k = j+1, num(i)
            if (m(i,k) == 0) cycle
            if (s(m(i,j)) == s(m(i,k))) then
              cnt = cnt + 1
              m(i,k) = 0
            end if
          end do
        end do
      end do

      print *, n - cnt

end program main
