import math
n,k = map(int,input().split())
num = 0
for i in range(1,n + 1):#サイコロの出た目
    if i >= k:
        num += 1 / n
    else:
        num += (1 / (n * (2 ** math.ceil(math.log(k / i,2)))))
print(num) import math math n,k = map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split k num = 0 num 0 for i in range(1,n + 1):#サイコロの出た目
    if i >= k:
        num += 1 / n
    else:
        num += (1 / (n * (2 ** math.ceil(math.log(k / i,2))))) i range(1,n + 1) range 1 n + 1 n 1 if i >= k:
        num += 1 / n
    else:
        num += (1 / (n * (2 ** math.ceil(math.log(k / i,2))))) i >= k i k num += 1 / n num 1 / n 1 n num += (1 / (n * (2 ** math.ceil(math.log(k / i,2))))) num 1 / (n * (2 ** math.ceil(math.log(k / i,2)))) 1 n * (2 ** math.ceil(math.log(k / i,2))) n 2 ** math.ceil(math.log(k / i,2)) 2 math.ceil(math.log(k / i,2)) math.ceil math ceil math.log(k / i,2) math.log math log k / i k i 2 print(num) print num n,k = map(int,input().split()) map(int,input().split()) n num = 0 0 num k = map(int,input().split()) map(int,input().split()) k num += (1 / (n * (2 ** math.ceil(math.log(k / i,2))))) 1 / (n * (2 ** math.ceil(math.log(k / i,2)))) num num += 1 / n 1 / n num
import math
n,k = map(int,input().split())
num = 0
for i in range(1,n + 1):#サイコロの出た目
    if i >= k:
        num += 1 / n
    else:
        num += (1 / (n * (2 ** math.ceil(math.log(k / i,2)))))
print(num)