#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Created: Jul, 12, 2020 15:02:31 by Nobody
# $Author$
# $Date$
# $URL$
__giturl__ = "$URL$"


import bisect
from sys import stdin
input = stdin.readline


def least(n, k):
  return bisect.bisect_left(list(map(lambda x: n*2**x, range(20))), k)


def main():
  N, K = list(map(int, input().split()))

  P = 0
  for i in range(1, N+1):
    if 0 < i < K:
      P += (1/N) * (0.5)**least(i, K)
    if K <= i:
      P += (1/N)

  print(P)


if(__name__ == '__main__'):
  main() __giturl__ = "$URL$" __giturl__ "$URL$" import bisect bisect from sys import stdin input = stdin.readline input stdin.readline stdin readline def least(n, k):
  return bisect.bisect_left(list(map(lambda x: n*2**x, range(20))), k) least return bisect.bisect_left(list(map(lambda x: n*2**x, range(20))), k) bisect.bisect_left(list(map(lambda x: n*2**x, range(20))), k) bisect.bisect_left bisect bisect_left list(map(lambda x: n*2**x, range(20))) list map(lambda x: n*2**x, range(20)) map lambda x: n*2**x n*2**x n 2**x 2 x x range(20) range 20 k n n k k def main():
  N, K = list(map(int, input().split()))

  P = 0
  for i in range(1, N+1):
    if 0 < i < K:
      P += (1/N) * (0.5)**least(i, K)
    if K <= i:
      P += (1/N)

  print(P) main N, K = list(map(int, input().split())) N list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split K P = 0 P 0 for i in range(1, N+1):
    if 0 < i < K:
      P += (1/N) * (0.5)**least(i, K)
    if K <= i:
      P += (1/N)

   i range(1, N+1) range 1 N+1 N 1 if 0 < i < K:
      P += (1/N) * (0.5)**least(i, K)
     0 < i < K 0 < i 0 i K P += (1/N) * (0.5)**least(i, K) P (1/N) * (0.5)**least(i, K) 1/N 1 N (0.5)**least(i, K) 0.5 least(i, K) least i K if K <= i:
      P += (1/N)

   K <= i K i P += (1/N) P 1/N 1 N print(P) print P if(__name__ == '__main__'):
  main() __name__ == '__main__' __name__ '__main__' main() main def least(n, k):
  return bisect.bisect_left(list(map(lambda x: n*2**x, range(20))), k) def least(n, k):
  return bisect.bisect_left(list(map(lambda x: n*2**x, range(20))), k) least def main():
  N, K = list(map(int, input().split()))

  P = 0
  for i in range(1, N+1):
    if 0 < i < K:
      P += (1/N) * (0.5)**least(i, K)
    if K <= i:
      P += (1/N)

  print(P) def main():
  N, K = list(map(int, input().split()))

  P = 0
  for i in range(1, N+1):
    if 0 < i < K:
      P += (1/N) * (0.5)**least(i, K)
    if K <= i:
      P += (1/N)

  print(P) main input = stdin.readline stdin.readline input
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Created: Jul, 12, 2020 15:02:31 by Nobody
# $Author$
# $Date$
# $URL$
__giturl__ = "$URL$"


import bisect
from sys import stdin
input = stdin.readline


def least(n, k):
  return bisect.bisect_left(list(map(lambda x: n*2**x, range(20))), k)


def main():
  N, K = list(map(int, input().split()))

  P = 0
  for i in range(1, N+1):
    if 0 < i < K:
      P += (1/N) * (0.5)**least(i, K)
    if K <= i:
      P += (1/N)

  print(P)


if(__name__ == '__main__'):
  main()
