from math import ceil, log2

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

rate = 0
for i in range(1, n + 1):
    cnt = 0
    if i < k:
        cnt = ceil(log2(k) - log2(i))
    rate += 1 / n * 0.5 ** cnt

print(rate) from math import ceil, log2 n, k = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split k rate = 0 rate 0 for i in range(1, n + 1):
    cnt = 0
    if i < k:
        cnt = ceil(log2(k) - log2(i))
    rate += 1 / n * 0.5 ** cnt i range(1, n + 1) range 1 n + 1 n 1 cnt = 0 cnt 0 if i < k:
        cnt = ceil(log2(k) - log2(i))
     i < k i k cnt = ceil(log2(k) - log2(i)) cnt ceil(log2(k) - log2(i)) ceil log2(k) - log2(i) log2(k) log2 k log2(i) log2 i rate += 1 / n * 0.5 ** cnt rate 1 / n * 0.5 ** cnt 1 / n 1 n 0.5 ** cnt 0.5 cnt print(rate) print rate cnt = 0 0 cnt rate += 1 / n * 0.5 ** cnt 1 / n * 0.5 ** cnt rate rate = 0 0 rate cnt = ceil(log2(k) - log2(i)) ceil(log2(k) - log2(i)) cnt n, k = map(int, input().split()) map(int, input().split()) n k = map(int, input().split()) map(int, input().split()) k
from math import ceil, log2

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

rate = 0
for i in range(1, n + 1):
    cnt = 0
    if i < k:
        cnt = ceil(log2(k) - log2(i))
    rate += 1 / n * 0.5 ** cnt

print(rate)
