import Control.Monad
import Data.Maybe
import qualified Data.ByteString.Char8 as BS
import Data.List

readInt = fst . fromJust . BS.readInt
readIntList = map readInt . BS.words
getInt = readInt <$> BS.getLine
getIntList = readIntList <$> BS.getLine

main = do
    [n, k] <- getIntList
    let m = f k 1
    let s = sum $ map (\i -> 2 ^ (m - (f k i))) [1..n]
    print $ (fromIntegral s) / ((fromIntegral 2 ^ m) * (fromIntegral n))

f k x | k <= x = 0
      | otherwise = 1 + (f k (2 * x))