import Control.Applicative main :: IO () main = do n <- read <$> getLine print $ solve n solve :: Int -> Int solve n = gcd n $ n*(n-1) `div` 2