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

read(*,*) n
allocate(s(n))
read(*,*)(s(i),i = 1,n)

do i = 1,size(s)
s= pack(s,s /= s(i))
cnt = cnt + 1
if (size(s) == 0) exit
end do

write(*,*)cnt
end program main