N,K = map(int,input().split())

def div_count(n,i):
    ans = i
    count = 0
    while n>ans:
        ans *= 2
        count += 1
    return count
ans = 0
for i in range(1,N+1):
    count = div_count(K,i)
    ans += (1/N) * pow(0.5,count)
print(ans)




 N,K = map(int,input().split()) N map(int,input().split()) map int input().split() ().split () input split K def div_count(n,i):
    ans = i
    count = 0
    while n>ans:
        ans *= 2
        count += 1
    return count div_count ans = i ans i count = 0 count 0 while n>ans:
        ans *= 2
        count += 1
     n>ans n ans ans *= 2 ans 2 count += 1 count 1 return count count n n i i ans = 0 ans 0 for i in range(1,N+1):
    count = div_count(K,i)
    ans += (1/N) * pow(0.5,count) i range(1,N+1) range 1 N+1 N 1 count = div_count(K,i) count div_count(K,i) div_count K i ans += (1/N) * pow(0.5,count) ans (1/N) * pow(0.5,count) 1/N 1 N pow(0.5,count) pow 0.5 count print(ans) print ans ans += (1/N) * pow(0.5,count) (1/N) * pow(0.5,count) ans count = div_count(K,i) div_count(K,i) count N,K = map(int,input().split()) map(int,input().split()) N K = map(int,input().split()) map(int,input().split()) K def div_count(n,i):
    ans = i
    count = 0
    while n>ans:
        ans *= 2
        count += 1
    return count def div_count(n,i):
    ans = i
    count = 0
    while n>ans:
        ans *= 2
        count += 1
    return count div_count ans = 0 0 ans
N,K = map(int,input().split())

def div_count(n,i):
    ans = i
    count = 0
    while n>ans:
        ans *= 2
        count += 1
    return count
ans = 0
for i in range(1,N+1):
    count = div_count(K,i)
    ans += (1/N) * pow(0.5,count)
print(ans)





