import Data.List (sort)
import Data.Char (toLower)
import Text.Printf (printf)

readIntLine :: IO ([Int])
readIntLine = do
    x <- getLine
    return $ map (read :: String -> Int) $ words x

main :: IO ()
main = do
    [n,k] <- readIntLine
    putStrLn $ printf "%.10f" $ prob n k

prob :: Int -> Int -> Double
prob n k =
    let comp = sum $ map (singleprob k) [1..n]
      in comp / (fromIntegral n)

singleprob :: Int -> Int -> Double
singleprob k l =
    if l >= k then 1.0
              else 0.5 * singleprob k (2*l)
