n, k = map(int, input().split())

if n >= k:
    ans = (n-k+1)
else:
    ans = 0

for i in range(1, min(n+1, k)):
    cnt = 0
    score = i
    while score < k:
        score *= 2
        cnt += 1
    ans += pow(1/2, cnt)

ans /= n
print(ans) n, k = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split k if n >= k:
    ans = (n-k+1)
else:
    ans = 0 n >= k n k ans = (n-k+1) ans n-k+1 n-k n k 1 ans = 0 ans 0 for i in range(1, min(n+1, k)):
    cnt = 0
    score = i
    while score < k:
        score *= 2
        cnt += 1
    ans += pow(1/2, cnt) i range(1, min(n+1, k)) range 1 min(n+1, k) min n+1 n 1 k cnt = 0 cnt 0 score = i score i while score < k:
        score *= 2
        cnt += 1
     score < k score k score *= 2 score 2 cnt += 1 cnt 1 ans += pow(1/2, cnt) ans pow(1/2, cnt) pow 1/2 1 2 cnt ans /= n ans n print(ans) print ans k = map(int, input().split()) map(int, input().split()) k ans = (n-k+1) n-k+1 ans score *= 2 2 score cnt += 1 1 cnt score = i i score n, k = map(int, input().split()) map(int, input().split()) n ans /= n n ans ans = 0 0 ans cnt = 0 0 cnt ans += pow(1/2, cnt) pow(1/2, cnt) ans
n, k = map(int, input().split())

if n >= k:
    ans = (n-k+1)
else:
    ans = 0

for i in range(1, min(n+1, k)):
    cnt = 0
    score = i
    while score < k:
        score *= 2
        cnt += 1
    ans += pow(1/2, cnt)

ans /= n
print(ans)
