import math

n, k = map(int, input().split())
log2 = math.log10( 2)
ans = 0
for i in range(1,n+1):
    temp = i
    num = 1/n
    while temp < k:
        num /= 2
        temp *= 2
    ans += num

print(ans) import math math n, k = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split k log2 = math.log10( 2) log2 math.log10( 2) math.log10 math log10 2 ans = 0 ans 0 for i in range(1,n+1):
    temp = i
    num = 1/n
    while temp < k:
        num /= 2
        temp *= 2
    ans += num i range(1,n+1) range 1 n+1 n 1 temp = i temp i num = 1/n num 1/n 1 n while temp < k:
        num /= 2
        temp *= 2
     temp < k temp k num /= 2 num 2 temp *= 2 temp 2 ans += num ans num print(ans) print ans num /= 2 2 num log2 = math.log10( 2) math.log10( 2) log2 ans += num num ans temp = i i temp n, k = map(int, input().split()) map(int, input().split()) n num = 1/n 1/n num k = map(int, input().split()) map(int, input().split()) k ans = 0 0 ans temp *= 2 2 temp
import math

n, k = map(int, input().split())
log2 = math.log10( 2)
ans = 0
for i in range(1,n+1):
    temp = i
    num = 1/n
    while temp < k:
        num /= 2
        temp *= 2
    ans += num

print(ans)