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