fun main(args:Array<String>){
  var (n,k) = readLine()!!.split(" ").map(String::toInt)
  var dice:Double = 1.0/n
  var count = 0.0
  var coin = 0.5
  var par = 0.0
  for(i in n downTo 1){
    var o = i
    while(true){
      if(o >= k)break
      o *= 2
      count++
    }
    par += dice * Math.pow(coin,count)
    count = 0.0
  }
  println(par)
}