def get_exp(i,m):
    c=0
    while i<m:
        i=i*2
        c+=1
    return c

n,k=map(int,input().split())
r=0
for x in range(1,n+1):
    r+=1/(n*(2**get_exp(x,k)))
    
print(r) def get_exp(i,m):
    c=0
    while i<m:
        i=i*2
        c+=1
    return c get_exp c=0 c 0 while i<m:
        i=i*2
        c+=1
     i<m i m i=i*2 i i*2 i 2 c+=1 c 1 return c c i i m m n,k=map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split k r=0 r 0 for x in range(1,n+1):
    r+=1/(n*(2**get_exp(x,k)))
     x range(1,n+1) range 1 n+1 n 1 r+=1/(n*(2**get_exp(x,k))) r 1/(n*(2**get_exp(x,k))) 1 n*(2**get_exp(x,k)) n 2**get_exp(x,k) 2 get_exp(x,k) get_exp x k print(r) print r r=0 0 r r+=1/(n*(2**get_exp(x,k))) 1/(n*(2**get_exp(x,k))) r n,k=map(int,input().split()) map(int,input().split()) n k=map(int,input().split()) map(int,input().split()) k def get_exp(i,m):
    c=0
    while i<m:
        i=i*2
        c+=1
    return c def get_exp(i,m):
    c=0
    while i<m:
        i=i*2
        c+=1
    return c get_exp
def get_exp(i,m):
    c=0
    while i<m:
        i=i*2
        c+=1
    return c

n,k=map(int,input().split())
r=0
for x in range(1,n+1):
    r+=1/(n*(2**get_exp(x,k)))
    
print(r)