N,K=map(int,input().split())
p=0
for i in range(1,N+1):
    c=0
    while i<K:
        i*=2
        c+=1
    if c!=0:
        p+=((1/2)**c)*(1/N)
if N>=K:
    p+=(N-K+1)/N
print(p) N,K=map(int,input().split()) N map(int,input().split()) map int input().split() ().split () input split K p=0 p 0 for i in range(1,N+1):
    c=0
    while i<K:
        i*=2
        c+=1
    if c!=0:
        p+=((1/2)**c)*(1/N) i range(1,N+1) range 1 N+1 N 1 c=0 c 0 while i<K:
        i*=2
        c+=1
     i<K i K i*=2 i 2 c+=1 c 1 if c!=0:
        p+=((1/2)**c)*(1/N) c!=0 c 0 p+=((1/2)**c)*(1/N) p ((1/2)**c)*(1/N) (1/2)**c 1/2 1 2 c 1/N 1 N if N>=K:
    p+=(N-K+1)/N N>=K N K p+=(N-K+1)/N p (N-K+1)/N N-K+1 N-K N K 1 N print(p) print p N,K=map(int,input().split()) map(int,input().split()) N c=0 0 c p+=(N-K+1)/N (N-K+1)/N p i*=2 2 i p=0 0 p c+=1 1 c K=map(int,input().split()) map(int,input().split()) K p+=((1/2)**c)*(1/N) ((1/2)**c)*(1/N) p
N,K=map(int,input().split())
p=0
for i in range(1,N+1):
    c=0
    while i<K:
        i*=2
        c+=1
    if c!=0:
        p+=((1/2)**c)*(1/N)
if N>=K:
    p+=(N-K+1)/N
print(p)