import Control.Applicative
import Control.Monad
 
main :: IO ()
main = do
    n <- readLn
    putStrLn $ show (solve n)
    
solve :: Int -> Double
solve n = fromIntegral (length (takeWhile (<= n) [1,3..])) / fromIntegral n