module Main where

import           Control.Monad
import           Control.Monad.State
import           Data.Array.IO
import           Data.Char
import           Data.List
import           Data.List.Split
import           Data.Ord
import qualified Data.Vector.Unboxed as V
import           Text.Printf

main :: IO ()
main = do
  [n, k] <- map read . words <$> getLine :: IO [Int]
  printf "%.10f\n"
    $ (/ realToFrac n)
    $ (`execState` 0)
    $ forM_ [1 .. n]
    $ \i -> do
      let p = k `div` i
          q = f (realToFrac p) 1
      modify (+ (1 / q))
  where
    f :: Double -> Double -> Double
    f p i
      | i >= p = i
      | otherwise = f p (i * 2)

