def f(n):
    k = 0
    while n*2**k<K:
        k += 1
    return k
N,K = map(int,input().split())
if K<=N:
    P = (N-K+1)/N
    for i in range(1,K):
        P += 2**(-f(i))/N
else:
    P = 0
    for i in range(1,N+1):
        P += 2**(-f(i))/N
print(P) def f(n):
    k = 0
    while n*2**k<K:
        k += 1
    return k f k = 0 k 0 while n*2**k<K:
        k += 1
     n*2**k<K n*2**k n 2**k 2 k K k += 1 k 1 return k k n n N,K = map(int,input().split()) N map(int,input().split()) map int input().split() ().split () input split K if K<=N:
    P = (N-K+1)/N
    for i in range(1,K):
        P += 2**(-f(i))/N
else:
    P = 0
    for i in range(1,N+1):
        P += 2**(-f(i))/N K<=N K N P = (N-K+1)/N P (N-K+1)/N N-K+1 N-K N K 1 N for i in range(1,K):
        P += 2**(-f(i))/N i range(1,K) range 1 K P += 2**(-f(i))/N P 2**(-f(i))/N 2**(-f(i)) 2 -f(i) f(i) f i N P = 0 P 0 for i in range(1,N+1):
        P += 2**(-f(i))/N i range(1,N+1) range 1 N+1 N 1 P += 2**(-f(i))/N P 2**(-f(i))/N 2**(-f(i)) 2 -f(i) f(i) f i N print(P) print P P += 2**(-f(i))/N 2**(-f(i))/N P def f(n):
    k = 0
    while n*2**k<K:
        k += 1
    return k def f(n):
    k = 0
    while n*2**k<K:
        k += 1
    return k f P += 2**(-f(i))/N 2**(-f(i))/N P P = (N-K+1)/N (N-K+1)/N P N,K = map(int,input().split()) map(int,input().split()) N K = map(int,input().split()) map(int,input().split()) K P = 0 0 P
def f(n):
    k = 0
    while n*2**k<K:
        k += 1
    return k
N,K = map(int,input().split())
if K<=N:
    P = (N-K+1)/N
    for i in range(1,K):
        P += 2**(-f(i))/N
else:
    P = 0
    for i in range(1,N+1):
        P += 2**(-f(i))/N
print(P)