import Control.Monad
import Data.List

main=do
 n<-readLn
 d<-replicateM n readLn
 print(f (sort d::[Int]) 0)
  where f d i = if (length d)>1 then (f (tail d) (if d!!0/=d!!1 then i+1 else i)) else i+1