import Control.Applicative
import Control.Monad
import Data.List
import Data.Array
import Data.Char

main = do
  n <- (read::String -> Int) <$> getLine
  let oddNum = (n + 1) `div` 2
  print $ (fromIntegral oddNum ::Float) / (fromIntegral n ::Float)