count :: [Int] -> Int -> [Int]
count ns k = c 0 <$> ns
  where c :: Int -> Int -> Int
        c n v = if v < k then c (n + 1) (v * 2) else n

average :: [Double] -> Double
average ns = sum ns / fromIntegral (length ns)

main :: IO ()
main = do
  [n, k] <- map read . words <$> getLine
  print . sum $ (\x -> 1 / fromIntegral n * 0.5 ^ x) <$> count [1..n] k