import Control.Applicative
 
main :: IO ()
main = do
    ns <- map read . words <$> getLine
    putStrLn $ show (solve ns)
    
solve :: [Int] -> Int 
solve ns = if length (filter (/= (minimum ns)) ns) == 1 then maximum ns else minimum ns