def main():

  import sys

  input = sys.stdin.readline

  import numpy as np

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

  ans=0

  for i in range(1,n+1):

    ans+=1/pow(2,max(int(np.ceil(np.log2(k/i))),0))         

  print((ans/n))

if __name__=='__main__':

  main()
def main():

  import sys

  input = sys.stdin.readline

  import math

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

  ans=0

  for i in range(1,n+1):

    ans+=1/pow(2,max(int(math.ceil(math.log2(k/i))),0))         

  print((ans/n))

if __name__=='__main__':

  main()
def main():
    import sys

    input = sys.stdin.readline
    import numpy as np

    n, k = list(map(int, input().split()))
    ans = 0
    for i in range(1, n + 1):
        ans += 1 / pow(2, max(int(np.ceil(np.log2(k / i))), 0))
    print((ans / n))


if __name__ == "__main__":
    main()

def main():
    import sys

    input = sys.stdin.readline
    import math

    n, k = list(map(int, input().split()))
    ans = 0
    for i in range(1, n + 1):
        ans += 1 / pow(2, max(int(math.ceil(math.log2(k / i))), 0))
    print((ans / n))


if __name__ == "__main__":
    main()

-    import numpy as np +    import math -        ans += 1 / pow(2, max(int(np.ceil(np.log2(k / i))), 0)) +        ans += 1 / pow(2, max(int(math.ceil(math.log2(k / i))), 0))