from math import log2, ceil
N, K = map(int, input().split())

ans = 0
j = 1.0
for x in range(N, 0, -1):
    if x >= K:
        ans += 1.0 * (1 / N)
    else:
        while x * j < K:
            j *= 2.0
        ans += (1.0 / j) * (1 / N)
print(ans) from math import log2, ceil N, K = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split K ans = 0 ans 0 j = 1.0 j 1.0 for x in range(N, 0, -1):
    if x >= K:
        ans += 1.0 * (1 / N)
    else:
        while x * j < K:
            j *= 2.0
        ans += (1.0 / j) * (1 / N) x range(N, 0, -1) range N 0 -1 if x >= K:
        ans += 1.0 * (1 / N)
    else:
        while x * j < K:
            j *= 2.0
        ans += (1.0 / j) * (1 / N) x >= K x K ans += 1.0 * (1 / N) ans 1.0 * (1 / N) 1.0 1 / N 1 N while x * j < K:
            j *= 2.0
         x * j < K x * j x j K j *= 2.0 j 2.0 ans += (1.0 / j) * (1 / N) ans (1.0 / j) * (1 / N) 1.0 / j 1.0 j 1 / N 1 N print(ans) print ans ans = 0 0 ans ans += (1.0 / j) * (1 / N) (1.0 / j) * (1 / N) ans N, K = map(int, input().split()) map(int, input().split()) N ans += 1.0 * (1 / N) 1.0 * (1 / N) ans j *= 2.0 2.0 j K = map(int, input().split()) map(int, input().split()) K j = 1.0 1.0 j
from math import log2, ceil
N, K = map(int, input().split())

ans = 0
j = 1.0
for x in range(N, 0, -1):
    if x >= K:
        ans += 1.0 * (1 / N)
    else:
        while x * j < K:
            j *= 2.0
        ans += (1.0 / j) * (1 / N)
print(ans)
