from math import log2

N,K = [int(i) for i in input().split()]
prob = 0
for i in range(1,N+1):
    j = 0
    while 2**(j) * i < K:
        j += 1
    prob += (1/N) * (0.5)**j
    # print((1/N) * (0.5)**j, j)
print(prob) from math import log2 int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) int i N,K = [int(i) for i in input().split()] N [int(i) for i in input().split()] K prob = 0 prob 0 for i in range(1,N+1):
    j = 0
    while 2**(j) * i < K:
        j += 1
    prob += (1/N) * (0.5)**j
    # print((1/N) * (0.5)**j, j) i range(1,N+1) range 1 N+1 N 1 j = 0 j 0 while 2**(j) * i < K:
        j += 1
     2**(j) * i < K 2**(j) * i 2**(j) 2 j i K j += 1 j 1 prob += (1/N) * (0.5)**j prob (1/N) * (0.5)**j 1/N 1 N (0.5)**j 0.5 j print(prob) print prob j += 1 1 j prob = 0 0 prob N,K = [int(i) for i in input().split()] [int(i) for i in input().split()] N K = [int(i) for i in input().split()] [int(i) for i in input().split()] K prob += (1/N) * (0.5)**j (1/N) * (0.5)**j prob j = 0 0 j
from math import log2

N,K = [int(i) for i in input().split()]
prob = 0
for i in range(1,N+1):
    j = 0
    while 2**(j) * i < K:
        j += 1
    prob += (1/N) * (0.5)**j
    # print((1/N) * (0.5)**j, j)
print(prob)