main = do
  (n:k:_) <- fmap (read :: String -> Int) . words <$> getLine
  print $ ((sum $ map (prob k) [1..n]) / (fromIntegral n))

prob score initValue 
  | score <= initValue = 1
  | otherwise = 0.5 * (prob score (initValue * 2))