import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

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

if k == 1:
    print(1)
    sys.exit(0)

# 場合分けをする必要はなかった
#if k <= n:
#    ans = ((n - k) + 1) / n
#    upper = k - 1
#else:
#    ans = 0
#    upper = n
#for i in range(1, upper + 1):
#    tmp = 1 / n
#    while i < k:
#        tmp *= (1 / 2)
#        i *= 2
#    ans += tmp
ans = 0
for i in range(1, n + 1):
    tmp =  1 / n
    while i < k:
        tmp *= (1 / 2)
        i *= 2
    ans += tmp
print(ans) import sys sys input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline sys.setrecursionlimit(10 ** 7) sys.setrecursionlimit sys setrecursionlimit 10 ** 7 10 7 n, k = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split k if k == 1:
    print(1)
    sys.exit(0)

# 場合分けをする必要はなかった
#if k <= n:
#    ans = ((n - k) + 1) / n
#    upper = k - 1
#else:
#    ans = 0
#    upper = n
#for i in range(1, upper + 1):
#    tmp = 1 / n
#    while i < k:
#        tmp *= (1 / 2)
#        i *= 2
#    ans += tmp k == 1 k 1 print(1) print 1 sys.exit(0) sys.exit sys exit 0 ans = 0 ans 0 for i in range(1, n + 1):
    tmp =  1 / n
    while i < k:
        tmp *= (1 / 2)
        i *= 2
    ans += tmp i range(1, n + 1) range 1 n + 1 n 1 tmp =  1 / n tmp 1 / n 1 n while i < k:
        tmp *= (1 / 2)
        i *= 2
     i < k i k tmp *= (1 / 2) tmp 1 / 2 1 2 i *= 2 i 2 ans += tmp ans tmp print(ans) print ans n, k = map(int, input().split()) map(int, input().split()) n ans += tmp tmp ans ans = 0 0 ans tmp *= (1 / 2) 1 / 2 tmp i *= 2 2 i k = map(int, input().split()) map(int, input().split()) k input = sys.stdin.readline sys.stdin.readline input tmp =  1 / n 1 / n tmp
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

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

if k == 1:
    print(1)
    sys.exit(0)

# 場合分けをする必要はなかった
#if k <= n:
#    ans = ((n - k) + 1) / n
#    upper = k - 1
#else:
#    ans = 0
#    upper = n
#for i in range(1, upper + 1):
#    tmp = 1 / n
#    while i < k:
#        tmp *= (1 / 2)
#        i *= 2
#    ans += tmp
ans = 0
for i in range(1, n + 1):
    tmp =  1 / n
    while i < k:
        tmp *= (1 / 2)
        i *= 2
    ans += tmp
print(ans)
