import math

N,K=map(int,input().split())
p=math.ceil(math.log(K,2))
#print(p)
x=N*(2**p)
#print(x)
s=0

for n in range(1,N+1):
    if n>=K:
        s+=(x//N)
    else:
        q=math.ceil(math.log(K/n,2))
        s+=2**(p-q)
        #print(n,2**(p-q))

print(s/x) import math math N,K=map(int,input().split()) N map(int,input().split()) map int input().split() ().split () input split K p=math.ceil(math.log(K,2)) p math.ceil(math.log(K,2)) math.ceil math ceil math.log(K,2) math.log math log K 2 x=N*(2**p) x N*(2**p) N 2**p 2 p s=0 s 0 for n in range(1,N+1):
    if n>=K:
        s+=(x//N)
    else:
        q=math.ceil(math.log(K/n,2))
        s+=2**(p-q)
        #print(n,2**(p-q)) n range(1,N+1) range 1 N+1 N 1 if n>=K:
        s+=(x//N)
    else:
        q=math.ceil(math.log(K/n,2))
        s+=2**(p-q)
        #print(n,2**(p-q)) n>=K n K s+=(x//N) s x//N x N q=math.ceil(math.log(K/n,2)) q math.ceil(math.log(K/n,2)) math.ceil math ceil math.log(K/n,2) math.log math log K/n K n 2 s+=2**(p-q) s 2**(p-q) 2 p-q p q print(s/x) print s/x s x N,K=map(int,input().split()) map(int,input().split()) N x=N*(2**p) N*(2**p) x s+=2**(p-q) 2**(p-q) s s+=(x//N) x//N s q=math.ceil(math.log(K/n,2)) math.ceil(math.log(K/n,2)) q K=map(int,input().split()) map(int,input().split()) K s=0 0 s p=math.ceil(math.log(K,2)) math.ceil(math.log(K,2)) p
import math

N,K=map(int,input().split())
p=math.ceil(math.log(K,2))
#print(p)
x=N*(2**p)
#print(x)
s=0

for n in range(1,N+1):
    if n>=K:
        s+=(x//N)
    else:
        q=math.ceil(math.log(K/n,2))
        s+=2**(p-q)
        #print(n,2**(p-q))

print(s/x)