from math import *
N,K=list(map(int,input().split()))
out=0
for n in range(1,N+1):
    if n>=K:
        out+=1/N
    else:
        out+=(1/N)*(1/2)**(ceil(log(K/n,2)))
print(out) from math import * N,K=list(map(int,input().split())) N list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split K out=0 out 0 for n in range(1,N+1):
    if n>=K:
        out+=1/N
    else:
        out+=(1/N)*(1/2)**(ceil(log(K/n,2))) n range(1,N+1) range 1 N+1 N 1 if n>=K:
        out+=1/N
    else:
        out+=(1/N)*(1/2)**(ceil(log(K/n,2))) n>=K n K out+=1/N out 1/N 1 N out+=(1/N)*(1/2)**(ceil(log(K/n,2))) out (1/N)*(1/2)**(ceil(log(K/n,2))) 1/N 1 N (1/2)**(ceil(log(K/n,2))) 1/2 1 2 ceil(log(K/n,2)) ceil log(K/n,2) log K/n K n 2 print(out) print out out+=(1/N)*(1/2)**(ceil(log(K/n,2))) (1/N)*(1/2)**(ceil(log(K/n,2))) out N,K=list(map(int,input().split())) list(map(int,input().split())) N out=0 0 out K=list(map(int,input().split())) list(map(int,input().split())) K out+=1/N 1/N out
from math import *
N,K=list(map(int,input().split()))
out=0
for n in range(1,N+1):
    if n>=K:
        out+=1/N
    else:
        out+=(1/N)*(1/2)**(ceil(log(K/n,2)))
print(out)