import Foundation
func sqrtd(_ a: Int, _ N: Int) -> Int {
  var a = a
  var current = 0
  while a < N {
    a *= 2
    current += 1
  }
  return current
}

let input = readLine()!.split(separator: " ").map { Int($0)! }

let N = input[0]
let K = input[1]

var sum: Double = 0.0
let coe = 1.0 / Double(N)
for i in 0..<N {
  let current = i + 1
  if current >= K {
    sum += coe
    continue
  }
  let times = sqrtd(current, K)
  sum += coe * pow(0.5, Double(times))
}
print(sum)