main = do
    n <- readLn
    -- [a,b] <- map read . words <$> getLine
    putStrLn . show $ solve n

solve :: Int -> Float
solve n = if even n then 0.5 else (fromIntegral n + 1) / 2 / fromIntegral n
