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

ans = 0
twol = [0]*20
for i in range(1,n+1): 
    two = 0
    curr_i = i
    for i in range(20):
        if curr_i >= k: break
        curr_i *= 2
        two += 1
    twol[two] += 1

ans = 0
for two, cnt in enumerate(twol):
    ans += cnt/pow(2,two)
    
ans /= n
print(ans)
# for i in range(20):
#     if pow(2,i) * n >= k: n ,k = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split k ans = 0 ans 0 twol = [0]*20 twol [0]*20 [0] 0 20 for i in range(1,n+1): 
    two = 0
    curr_i = i
    for i in range(20):
        if curr_i >= k: break
        curr_i *= 2
        two += 1
    twol[two] += 1 i range(1,n+1) range 1 n+1 n 1 two = 0 two 0 curr_i = i curr_i i for i in range(20):
        if curr_i >= k: break
        curr_i *= 2
        two += 1
     i range(20) range 20 if curr_i >= k: break
         curr_i >= k curr_i k curr_i *= 2 curr_i 2 two += 1 two 1 twol[two] += 1 twol[two] twol two 1 ans = 0 ans 0 for two, cnt in enumerate(twol):
    ans += cnt/pow(2,two)
     two cnt enumerate(twol) enumerate twol ans += cnt/pow(2,two) ans cnt/pow(2,two) cnt pow(2,two) pow 2 two ans /= n ans n print(ans) print ans ans = 0 0 ans ans += cnt/pow(2,two) cnt/pow(2,two) ans curr_i = i i curr_i ans = 0 0 ans k = map(int, input().split()) map(int, input().split()) k twol = [0]*20 [0]*20 twol ans /= n n ans two = 0 0 two curr_i *= 2 2 curr_i n ,k = map(int, input().split()) map(int, input().split()) n two += 1 1 two
n ,k = map(int, input().split())

ans = 0
twol = [0]*20
for i in range(1,n+1): 
    two = 0
    curr_i = i
    for i in range(20):
        if curr_i >= k: break
        curr_i *= 2
        two += 1
    twol[two] += 1

ans = 0
for two, cnt in enumerate(twol):
    ans += cnt/pow(2,two)
    
ans /= n
print(ans)
# for i in range(20):
#     if pow(2,i) * n >= k:
