import Control.Applicative
  
main = do
    [n,k] <- map read.words <$> getLine :: IO [Double]
    putStrLn.show.(/n).sum $ map (answer k) [1..n]

answer :: Double -> Double -> Double
answer goal pt = (1/2) ** v where
    table = map (\x -> pt*fromIntegral (2^x)) [0,1..]
    v = fromIntegral $ length $ takeWhile (<goal) table