data=input().split()
N=int(data[0])
K=int(data[1])
ans=0
for i in range(1,N+1):
    dice=i
    n=0
    while 1<=dice<=K-1:
        dice*=2
        n+=1
    ans+=((1/2)**n)/N
print(ans) data=input().split() data input().split() ().split () input split N=int(data[0]) N int(data[0]) int data[0] data 0 K=int(data[1]) K int(data[1]) int data[1] data 1 ans=0 ans 0 for i in range(1,N+1):
    dice=i
    n=0
    while 1<=dice<=K-1:
        dice*=2
        n+=1
    ans+=((1/2)**n)/N i range(1,N+1) range 1 N+1 N 1 dice=i dice i n=0 n 0 while 1<=dice<=K-1:
        dice*=2
        n+=1
     1<=dice<=K-1 1<=dice 1 dice K-1 K 1 dice*=2 dice 2 n+=1 n 1 ans+=((1/2)**n)/N ans ((1/2)**n)/N (1/2)**n 1/2 1 2 n N print(ans) print ans n=0 0 n dice=i i dice N=int(data[0]) int(data[0]) N K=int(data[1]) int(data[1]) K ans+=((1/2)**n)/N ((1/2)**n)/N ans n+=1 1 n data=input().split() input().split() data ans=0 0 ans dice*=2 2 dice
data=input().split()
N=int(data[0])
K=int(data[1])
ans=0
for i in range(1,N+1):
    dice=i
    n=0
    while 1<=dice<=K-1:
        dice*=2
        n+=1
    ans+=((1/2)**n)/N
print(ans)