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

main = do
    [n, k] <- (map read) <$> words <$> getLine
    putStrLn $ show $ solve n k

solve :: Int -> Int -> Double
solve n k = sum [prob i k | i <- [1..n]] / (fromIntegral n)

prob :: Int -> Int -> Double
prob 0 _ = 0
prob i k
    | i >= k = 1
    | otherwise = (prob (i*2) k) / 2