
[N,K] = list(map(int,input().split()))

nino_ijo=[0]*21
for i in range(21):
    nino_ijo[i] = 2**i
# print('nino:', nino_ijo)

out=0
for i in range(1,N+1):
    # print('i:',i)
    for j in range(21):
        if i*(2**j) >= K:
            out += (1/N) * ((1/2)**j)
            break
    # print('out:',out)
print(out) [N,K] = list(map(int,input().split())) [N,K] N K list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split nino_ijo=[0]*21 nino_ijo [0]*21 [0] 0 21 for i in range(21):
    nino_ijo[i] = 2**i
# print('nino:', nino_ijo) i range(21) range 21 nino_ijo[i] = 2**i nino_ijo[i] nino_ijo i 2**i 2 i out=0 out 0 for i in range(1,N+1):
    # print('i:',i)
    for j in range(21):
        if i*(2**j) >= K:
            out += (1/N) * ((1/2)**j)
            break
    # print('out:',out) i range(1,N+1) range 1 N+1 N 1 for j in range(21):
        if i*(2**j) >= K:
            out += (1/N) * ((1/2)**j)
            break
    # print('out:',out) j range(21) range 21 if i*(2**j) >= K:
            out += (1/N) * ((1/2)**j)
            break
    # print('out:',out) i*(2**j) >= K i*(2**j) i 2**j 2 j K out += (1/N) * ((1/2)**j) out (1/N) * ((1/2)**j) 1/N 1 N (1/2)**j 1/2 1 2 j break print(out) print out out=0 0 out out += (1/N) * ((1/2)**j) (1/N) * ((1/2)**j) out nino_ijo=[0]*21 [0]*21 nino_ijo

[N,K] = list(map(int,input().split()))

nino_ijo=[0]*21
for i in range(21):
    nino_ijo[i] = 2**i
# print('nino:', nino_ijo)

out=0
for i in range(1,N+1):
    # print('i:',i)
    for j in range(21):
        if i*(2**j) >= K:
            out += (1/N) * ((1/2)**j)
            break
    # print('out:',out)
print(out)
