let l:[Int] = readLine()!.split(separator:" ").map{ Int($0)! }
let n = l[0], k = l[1]

func pow (_ base:Int, _ power:Int) -> Int {
  var answer : Int = 1
  for _ in 0..<power { answer *= base }
  return answer
}

func c2(_ num: Int) -> Int {
  var m = num, c = 0
  while m < k {
    m *= 2
    c += 1
  }
  return c
}

let a = c2(1)
var sum = 1

if n >= 2 {
  for i in 2...n {
    sum += pow(2, a-c2(i))
  }
}

print(Double(sum)/Double(pow(2,a) * n))