import Data.ByteString.Char8 as BC hiding (length, group, tail, map, sort)
import Prelude hiding (getContents, lines, drop, putStrLn)
import Data.Maybe
import Data.List hiding (lines)

main =
    getContents >>=
        print . length . group . sort . tail . map (fst . fromJust . readInt) . lines