import math
N,K = map(int, input().split())
ans = 0
for n in range(1, N + 1):
    cnt = 0
    sums = n
    while sums < K:
        sums *= 2
        cnt += 1
    ans += 0.5 ** cnt
print(ans/N) 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 for n in range(1, N + 1):
    cnt = 0
    sums = n
    while sums < K:
        sums *= 2
        cnt += 1
    ans += 0.5 ** cnt n range(1, N + 1) range 1 N + 1 N 1 cnt = 0 cnt 0 sums = n sums n while sums < K:
        sums *= 2
        cnt += 1
     sums < K sums K sums *= 2 sums 2 cnt += 1 cnt 1 ans += 0.5 ** cnt ans 0.5 ** cnt 0.5 cnt print(ans/N) print ans/N ans N sums = n n sums ans += 0.5 ** cnt 0.5 ** cnt ans cnt = 0 0 cnt K = map(int, input().split()) map(int, input().split()) K cnt += 1 1 cnt ans = 0 0 ans sums *= 2 2 sums N,K = map(int, input().split()) map(int, input().split()) N
import math
N,K = map(int, input().split())
ans = 0
for n in range(1, N + 1):
    cnt = 0
    sums = n
    while sums < K:
        sums *= 2
        cnt += 1
    ans += 0.5 ** cnt
print(ans/N)