a,b=map(int,input().split())
r = 0
for i in range(1,a+1):
  tmp=1/a
  now=i
  while(now<b):
    now*=2
    tmp/=2
    #print(now, b)
  r+=tmp;
print(r) a,b=map(int,input().split()) a map(int,input().split()) map int input().split() ().split () input split b r = 0 r 0 for i in range(1,a+1):
  tmp=1/a
  now=i
  while(now<b):
    now*=2
    tmp/=2
    #print(now, b)
  r+=tmp; i range(1,a+1) range 1 a+1 a 1 tmp=1/a tmp 1/a 1 a now=i now i while(now<b):
    now*=2
    tmp/=2
    #print(now, b)
   now<b now b now*=2 now 2 tmp/=2 tmp 2 r+=tmp r tmp print(r) print r tmp=1/a 1/a tmp tmp/=2 2 tmp a,b=map(int,input().split()) map(int,input().split()) a now=i i now r = 0 0 r now*=2 2 now r+=tmp tmp r b=map(int,input().split()) map(int,input().split()) b
a,b=map(int,input().split())
r = 0
for i in range(1,a+1):
  tmp=1/a
  now=i
  while(now<b):
    now*=2
    tmp/=2
    #print(now, b)
  r+=tmp;
print(r)