a = [int(s) for s in input().split()]
N, K = a[0], a[1]
prob = 0
if N > K - 1: prob += (N - K + 1)/N
prob2 = 0
for i in range(1, min(N, K - 1) + 1):
    a = i
    j = 0
    while(a < K): 
        a = a << 1
        j += 1
    prob2 += 1/(2**j)
print(prob + prob2 * (1/N)) int(s) for s in input().split() for s in input().split() s input().split() ().split () input split for s in input().split() int(s) int s a = [int(s) for s in input().split()] a [int(s) for s in input().split()] N, K = a[0], a[1] N a[0] a 0 K a[1] a 1 prob = 0 prob 0 if N > K - 1: prob += (N - K + 1)/N N > K - 1 N K - 1 K 1 prob2 = 0 prob2 0 for i in range(1, min(N, K - 1) + 1):
    a = i
    j = 0
    while(a < K): 
        a = a << 1
        j += 1
    prob2 += 1/(2**j) i range(1, min(N, K - 1) + 1) range 1 min(N, K - 1) + 1 min(N, K - 1) min N K - 1 K 1 1 a = i a i j = 0 j 0 while(a < K): 
        a = a << 1
        j += 1
     a < K a K a = a << 1 a a << 1 a 1 j += 1 j 1 prob2 += 1/(2**j) prob2 1/(2**j) 1 2**j 2 j print(prob + prob2 * (1/N)) print prob + prob2 * (1/N) prob prob2 * (1/N) prob2 1/N 1 N prob2 = 0 0 prob2 a = i i a j = 0 0 j j += 1 1 j N, K = a[0], a[1] a[0] N K = a[0], a[1] a[1] K prob2 += 1/(2**j) 1/(2**j) prob2 prob = 0 0 prob a = a << 1 a << 1 a a = [int(s) for s in input().split()] [int(s) for s in input().split()] a
a = [int(s) for s in input().split()]
N, K = a[0], a[1]
prob = 0
if N > K - 1: prob += (N - K + 1)/N
prob2 = 0
for i in range(1, min(N, K - 1) + 1):
    a = i
    j = 0
    while(a < K): 
        a = a << 1
        j += 1
    prob2 += 1/(2**j)
print(prob + prob2 * (1/N))
