import qualified Data.ByteString.Char8 as BS
import Data.Maybe

readInt = fst . fromJust . BS.readInt

getInt = readInt <$> BS.getLine

main = getInt >>= \n -> print $ fromIntegral ((n + 1) `div` 2) / fromIntegral n
