
def solve():
    scr_ini = list(range(1,N+1))
#    print(scr_ini)
    cnt = [0] * N
    ans = [0] * N
    for i in range(N):
        j = 0
        while scr_ini[i]*2**j < K:
            cnt[i] = j
            j += 1
        if scr_ini[i]*2**j >= K:
            cnt[i] = j
            ans[i] = (1/N) * 0.5**j
#    print(cnt) 
#    print(ans)
    print(sum(ans))

if __name__ == "__main__":
    N,K = list(map(int, input().split()))
    solve()   def solve():
    scr_ini = list(range(1,N+1))
#    print(scr_ini)
    cnt = [0] * N
    ans = [0] * N
    for i in range(N):
        j = 0
        while scr_ini[i]*2**j < K:
            cnt[i] = j
            j += 1
        if scr_ini[i]*2**j >= K:
            cnt[i] = j
            ans[i] = (1/N) * 0.5**j
#    print(cnt) 
#    print(ans)
    print(sum(ans)) solve scr_ini = list(range(1,N+1)) scr_ini list(range(1,N+1)) list range(1,N+1) range 1 N+1 N 1 cnt = [0] * N cnt [0] * N [0] 0 N ans = [0] * N ans [0] * N [0] 0 N for i in range(N):
        j = 0
        while scr_ini[i]*2**j < K:
            cnt[i] = j
            j += 1
        if scr_ini[i]*2**j >= K:
            cnt[i] = j
            ans[i] = (1/N) * 0.5**j
#    print(cnt) 
#    print(ans)
     i range(N) range N j = 0 j 0 while scr_ini[i]*2**j < K:
            cnt[i] = j
            j += 1
         scr_ini[i]*2**j < K scr_ini[i]*2**j scr_ini[i] scr_ini i 2**j 2 j K cnt[i] = j cnt[i] cnt i j j += 1 j 1 if scr_ini[i]*2**j >= K:
            cnt[i] = j
            ans[i] = (1/N) * 0.5**j
#    print(cnt) 
#    print(ans)
     scr_ini[i]*2**j >= K scr_ini[i]*2**j scr_ini[i] scr_ini i 2**j 2 j K cnt[i] = j cnt[i] cnt i j ans[i] = (1/N) * 0.5**j ans[i] ans i (1/N) * 0.5**j 1/N 1 N 0.5**j 0.5 j print(sum(ans)) print sum(ans) sum ans if __name__ == "__main__":
    N,K = list(map(int, input().split()))
    solve()   __name__ == "__main__" __name__ "__main__" 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 solve() solve N,K = list(map(int, input().split())) list(map(int, input().split())) N def solve():
    scr_ini = list(range(1,N+1))
#    print(scr_ini)
    cnt = [0] * N
    ans = [0] * N
    for i in range(N):
        j = 0
        while scr_ini[i]*2**j < K:
            cnt[i] = j
            j += 1
        if scr_ini[i]*2**j >= K:
            cnt[i] = j
            ans[i] = (1/N) * 0.5**j
#    print(cnt) 
#    print(ans)
    print(sum(ans)) def solve():
    scr_ini = list(range(1,N+1))
#    print(scr_ini)
    cnt = [0] * N
    ans = [0] * N
    for i in range(N):
        j = 0
        while scr_ini[i]*2**j < K:
            cnt[i] = j
            j += 1
        if scr_ini[i]*2**j >= K:
            cnt[i] = j
            ans[i] = (1/N) * 0.5**j
#    print(cnt) 
#    print(ans)
    print(sum(ans)) solve K = list(map(int, input().split())) list(map(int, input().split())) K

def solve():
    scr_ini = list(range(1,N+1))
#    print(scr_ini)
    cnt = [0] * N
    ans = [0] * N
    for i in range(N):
        j = 0
        while scr_ini[i]*2**j < K:
            cnt[i] = j
            j += 1
        if scr_ini[i]*2**j >= K:
            cnt[i] = j
            ans[i] = (1/N) * 0.5**j
#    print(cnt) 
#    print(ans)
    print(sum(ans))

if __name__ == "__main__":
    N,K = list(map(int, input().split()))
    solve()  
