
import Data.Bits
import Data.Foldable (foldlM,foldrM)
import Data.Maybe (fromJust)
import Data.List
import qualified Data.Vector.Unboxed as V
import Control.Monad
import qualified Data.ByteString.Lazy.Char8 as B
import Debug.Trace

pow2 :: Int -> Int -> Int -> Int
pow2 k now cnt = if now >= k then cnt
  else pow2 k (2*now) (cnt+1)

main :: IO ()
main = do
  [n,k] <- map read . words <$> getLine :: IO [Int]
  print $ (sum [((1/(fromIntegral n) :: Double) * (1/2 :: Double)^(pow2 k i 0)) | i <- [1..n]])
