import math

def f(n):
    cnt = 0
    while n != 0:
        n //= 2
        cnt += 1
    return max(cnt,1)

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

cnt = f(k)
ans = 0
num = n
for i in range(n):
    while cnt != 0 and k / (i+1) <= 2**(cnt - 1):
        cnt -= 1
    ans += (1 / num)*math.pow(0.5,cnt)
print(ans) import math math def f(n):
    cnt = 0
    while n != 0:
        n //= 2
        cnt += 1
    return max(cnt,1) f cnt = 0 cnt 0 while n != 0:
        n //= 2
        cnt += 1
     n != 0 n 0 n //= 2 n 2 cnt += 1 cnt 1 return max(cnt,1) max(cnt,1) max cnt 1 n n n, k = map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split k cnt = f(k) cnt f(k) f k ans = 0 ans 0 num = n num n for i in range(n):
    while cnt != 0 and k / (i+1) <= 2**(cnt - 1):
        cnt -= 1
    ans += (1 / num)*math.pow(0.5,cnt) i range(n) range n while cnt != 0 and k / (i+1) <= 2**(cnt - 1):
        cnt -= 1
     cnt != 0 and k / (i+1) <= 2**(cnt - 1) cnt != 0 cnt 0 k / (i+1) <= 2**(cnt - 1) k / (i+1) k i+1 i 1 2**(cnt - 1) 2 cnt - 1 cnt 1 cnt -= 1 cnt 1 ans += (1 / num)*math.pow(0.5,cnt) ans (1 / num)*math.pow(0.5,cnt) 1 / num 1 num math.pow(0.5,cnt) math.pow math pow 0.5 cnt print(ans) print ans num = n n num n, k = map(int,input().split()) map(int,input().split()) n k = map(int,input().split()) map(int,input().split()) k ans = 0 0 ans cnt -= 1 1 cnt def f(n):
    cnt = 0
    while n != 0:
        n //= 2
        cnt += 1
    return max(cnt,1) def f(n):
    cnt = 0
    while n != 0:
        n //= 2
        cnt += 1
    return max(cnt,1) f ans += (1 / num)*math.pow(0.5,cnt) (1 / num)*math.pow(0.5,cnt) ans cnt = f(k) f(k) cnt
import math

def f(n):
    cnt = 0
    while n != 0:
        n //= 2
        cnt += 1
    return max(cnt,1)

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

cnt = f(k)
ans = 0
num = n
for i in range(n):
    while cnt != 0 and k / (i+1) <= 2**(cnt - 1):
        cnt -= 1
    ans += (1 / num)*math.pow(0.5,cnt)
print(ans)
