import math
n,k = list(map(int,input().split()))
p = 0 

for i in range(1, n+1):
    if i<k:
        t = math.ceil(math.log2(k/i))
        p +=(1/n)*(1/2)**t
    else:
        p += 1/n
print(p) import math math n,k = list(map(int,input().split())) n list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split k p = 0 p 0 for i in range(1, n+1):
    if i<k:
        t = math.ceil(math.log2(k/i))
        p +=(1/n)*(1/2)**t
    else:
        p += 1/n i range(1, n+1) range 1 n+1 n 1 if i<k:
        t = math.ceil(math.log2(k/i))
        p +=(1/n)*(1/2)**t
    else:
        p += 1/n i<k i k t = math.ceil(math.log2(k/i)) t math.ceil(math.log2(k/i)) math.ceil math ceil math.log2(k/i) math.log2 math log2 k/i k i p +=(1/n)*(1/2)**t p (1/n)*(1/2)**t 1/n 1 n (1/2)**t 1/2 1 2 t p += 1/n p 1/n 1 n print(p) print p t = math.ceil(math.log2(k/i)) math.ceil(math.log2(k/i)) t k = list(map(int,input().split())) list(map(int,input().split())) k p += 1/n 1/n p p = 0 0 p p +=(1/n)*(1/2)**t (1/n)*(1/2)**t p n,k = list(map(int,input().split())) list(map(int,input().split())) n
import math
n,k = list(map(int,input().split()))
p = 0 

for i in range(1, n+1):
    if i<k:
        t = math.ceil(math.log2(k/i))
        p +=(1/n)*(1/2)**t
    else:
        p += 1/n
print(p)