import kotlin.comparisons.*
import java.util.*

const val MOD = 1000000007L

fun readI() = readLine()!!.toInt()
fun readL() = readLine()!!.toLong()
fun readD() = readLine()!!.toDouble()
fun readIs() = readLine()!!.split(' ').map(String::toInt)
fun readLs() = readLine()!!.split(' ').map(String::toLong)
fun readDs() = readLine()!!.split(' ').map(String::toDouble)

fun ceil(x: Double) = Math.ceil(x)
fun log2(x: Double) = Math.log(x) / 0.6931471805599453

fun main(args: Array<String>) {
  val (n, k) = readIs()
  val kf = k.toDouble()
  var ans = 0.0
  for (m in 1..n) {
    if (k <= m) {
      ans += 1
      continue
    }
    val x = ceil(log2(kf / m))
    ans += Math.pow(0.5, x)
  }
  println("%.13f".format(ans / n))
}
