main :: IO ()
main = do
  (n : k : _) <- map read . words <$> getLine :: IO [Int]
  print . fromRational $ solve n k

solve :: Int -> Int -> Rational
solve n k = sum (map f [1..n]) / toRational n
  where
    f :: Int -> Rational
    f i = (1 :: Rational) / toRational (g i)
    g :: Int -> Int
    g i = until (\l -> k <= i * l) (2 *) 1
