from fractions import Fraction
N, K = map(int, input().split())
ans = 0
for i in range(N):
    s = i + 1
    p = Fraction(1, N)
    while s < K:
        s *= 2
        p *= Fraction(1, 2)
    ans += p
print(float(ans)) from fractions import Fraction N, K = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split K ans = 0 ans 0 for i in range(N):
    s = i + 1
    p = Fraction(1, N)
    while s < K:
        s *= 2
        p *= Fraction(1, 2)
    ans += p i range(N) range N s = i + 1 s i + 1 i 1 p = Fraction(1, N) p Fraction(1, N) Fraction 1 N while s < K:
        s *= 2
        p *= Fraction(1, 2)
     s < K s K s *= 2 s 2 p *= Fraction(1, 2) p Fraction(1, 2) Fraction 1 2 ans += p ans p print(float(ans)) print float(ans) float ans p = Fraction(1, N) Fraction(1, N) p ans = 0 0 ans p *= Fraction(1, 2) Fraction(1, 2) p K = map(int, input().split()) map(int, input().split()) K s *= 2 2 s N, K = map(int, input().split()) map(int, input().split()) N s = i + 1 i + 1 s ans += p p ans
from fractions import Fraction
N, K = map(int, input().split())
ans = 0
for i in range(N):
    s = i + 1
    p = Fraction(1, N)
    while s < K:
        s *= 2
        p *= Fraction(1, 2)
    ans += p
print(float(ans))
