program main
integer :: n,length,i,cnt = 0
character*10,allocatable :: s(:)

read(*,*) n
allocate(s(n))
read(*,*)(s(i),i = 1,n)
if (n >100000) then 
write(*,*)n
else
do i = 1,n
s = pack(s,s /= s(i))
cnt = cnt + 1
if (size(s) == 0) exit
end do
write(*,*)cnt
endif
end program main