module Main where import Data.List main :: IO () main = do { xs <- getInts ; print $ case dropWhile (uncurry (==)) $ zip [1..] xs of [] -> 10 (y,_):_ -> y } getInts :: IO [Int] getInts = map read . words <$> getLine