import Control.Monad (replicateM)
import qualified Data.IntSet as IS

maxHeight :: [Int] -> Int
maxHeight = IS.size . IS.fromList

main :: IO ()
main = do
    n <- readLn :: IO Int
    ds <- replicateM n readLn :: IO [Int]
    print $ maxHeight ds
