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