{-# LANGUAGE BangPatterns , Strict, StrictData#-}
module Hoge where
import Data.List
import qualified Data.Vector as V
main = do    
  n <- (read <$> getLine) :: IO Int
  let a = [0..n]
  let l = V.fromList $ scanl' gcd 0 a
  let r = V.fromList $ reverse $ scanl' gcd 0 (reverse a)
 
  --print $ foldl max 0 $
  --  fmap (\i-> gcd (l V.! i) (r V.! (i+1))) [0..(n-1)]
        
  --print $ maximum $
  --  zipWith gcd l r

  print $ foldl max 0 $
     [ gcd (l V.! i) (r V.! (i + 1)) | i <- [0 .. ((fromIntegral n) - 1)] ]
  print "done"

