N, K = map(int, input().split())
border = []
inx = 0
while K > 1:
  border.append(K)
  K = (K + 1) >> 1
  inx += 1
border.append(1)
border.reverse()
pre = 1
cnt = []
for i in range(1, len(border)):
  if N < border[i]:
    cnt.append(N - pre + 1)
    break
  elif N == border[i]:
    cnt.append(border[i] - pre)
    cnt.append(1)
    break
  else:
    cnt.append(border[i] - pre)
    pre = border[i]
if N >= border[-1]:
  cnt.append(N - border[-1] + 1)
ans = 0
for c in cnt:
  ans += c * 0.5 ** inx
  inx -= 1
print(ans/N) N, K = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split K border = [] border [] inx = 0 inx 0 while K > 1:
  border.append(K)
  K = (K + 1) >> 1
  inx += 1 K > 1 K 1 border.append(K) border.append border append K K = (K + 1) >> 1 K (K + 1) >> 1 K + 1 K 1 1 inx += 1 inx 1 border.append(1) border.append border append 1 border.reverse() border.reverse border reverse pre = 1 pre 1 cnt = [] cnt [] for i in range(1, len(border)):
  if N < border[i]:
    cnt.append(N - pre + 1)
    break
  elif N == border[i]:
    cnt.append(border[i] - pre)
    cnt.append(1)
    break
  else:
    cnt.append(border[i] - pre)
    pre = border[i] i range(1, len(border)) range 1 len(border) len border if N < border[i]:
    cnt.append(N - pre + 1)
    break
  elif N == border[i]:
    cnt.append(border[i] - pre)
    cnt.append(1)
    break
  else:
    cnt.append(border[i] - pre)
    pre = border[i] N < border[i] N border[i] border i cnt.append(N - pre + 1) cnt.append cnt append N - pre + 1 N - pre N pre 1 break elif N == border[i]:
    cnt.append(border[i] - pre)
    cnt.append(1)
    break
   N == border[i] N border[i] border i cnt.append(border[i] - pre) cnt.append cnt append border[i] - pre border[i] border i pre cnt.append(1) cnt.append cnt append 1 break cnt.append(border[i] - pre) cnt.append cnt append border[i] - pre border[i] border i pre pre = border[i] pre border[i] border i if N >= border[-1]:
  cnt.append(N - border[-1] + 1) N >= border[-1] N border[-1] border -1 cnt.append(N - border[-1] + 1) cnt.append cnt append N - border[-1] + 1 N - border[-1] N border[-1] border -1 1 ans = 0 ans 0 for c in cnt:
  ans += c * 0.5 ** inx
  inx -= 1 c cnt ans += c * 0.5 ** inx ans c * 0.5 ** inx c 0.5 ** inx 0.5 inx inx -= 1 inx 1 print(ans/N) print ans/N ans N ans = 0 0 ans inx += 1 1 inx border = [] [] border inx -= 1 1 inx pre = border[i] border[i] pre N, K = map(int, input().split()) map(int, input().split()) N cnt = [] [] cnt K = map(int, input().split()) map(int, input().split()) K pre = 1 1 pre inx = 0 0 inx ans += c * 0.5 ** inx c * 0.5 ** inx ans K = (K + 1) >> 1 (K + 1) >> 1 K
N, K = map(int, input().split())
border = []
inx = 0
while K > 1:
  border.append(K)
  K = (K + 1) >> 1
  inx += 1
border.append(1)
border.reverse()
pre = 1
cnt = []
for i in range(1, len(border)):
  if N < border[i]:
    cnt.append(N - pre + 1)
    break
  elif N == border[i]:
    cnt.append(border[i] - pre)
    cnt.append(1)
    break
  else:
    cnt.append(border[i] - pre)
    pre = border[i]
if N >= border[-1]:
  cnt.append(N - border[-1] + 1)
ans = 0
for c in cnt:
  ans += c * 0.5 ** inx
  inx -= 1
print(ans/N)