#k = int(input())
#s = input()
#a, b = map(int, input().split())
#s, t = map(str, input().split())
#l = list(map(int, input().split()))
#l = [list(map(int,input().split())) for i in range(n)]
#a = [input() for _ in range(n)]

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

ans1 = 0
ans2 = 0
for i in range(1, n+1):
    num = 0
    score = i
    if (i >= k):
        ans1 += 1
    else:
        while True:
            score *= 2
            num += 1
            if (score >= k):
                break
        ans2 += (0.5)**num
print((ans1+ans2)/n)
 n, k = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split k ans1 = 0 ans1 0 ans2 = 0 ans2 0 for i in range(1, n+1):
    num = 0
    score = i
    if (i >= k):
        ans1 += 1
    else:
        while True:
            score *= 2
            num += 1
            if (score >= k):
                break
        ans2 += (0.5)**num i range(1, n+1) range 1 n+1 n 1 num = 0 num 0 score = i score i if (i >= k):
        ans1 += 1
    else:
        while True:
            score *= 2
            num += 1
            if (score >= k):
                break
        ans2 += (0.5)**num i >= k i k ans1 += 1 ans1 1 while True:
            score *= 2
            num += 1
            if (score >= k):
                break
         True score *= 2 score 2 num += 1 num 1 if (score >= k):
                break
         score >= k score k break ans2 += (0.5)**num ans2 (0.5)**num 0.5 num print((ans1+ans2)/n) print (ans1+ans2)/n ans1+ans2 ans1 ans2 n num += 1 1 num score = i i score k = map(int, input().split()) map(int, input().split()) k ans2 += (0.5)**num (0.5)**num ans2 ans1 = 0 0 ans1 score *= 2 2 score ans2 = 0 0 ans2 n, k = map(int, input().split()) map(int, input().split()) n num = 0 0 num ans1 += 1 1 ans1
#k = int(input())
#s = input()
#a, b = map(int, input().split())
#s, t = map(str, input().split())
#l = list(map(int, input().split()))
#l = [list(map(int,input().split())) for i in range(n)]
#a = [input() for _ in range(n)]

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

ans1 = 0
ans2 = 0
for i in range(1, n+1):
    num = 0
    score = i
    if (i >= k):
        ans1 += 1
    else:
        while True:
            score *= 2
            num += 1
            if (score >= k):
                break
        ans2 += (0.5)**num
print((ans1+ans2)/n)

