D, P = map(int, input().split())    
ans = 0.0
def func(i):
    t = 0
    while(i < P):
        i *= 2
        t += 1
    return t

for i in range(1, D + 1):
    ans += float((1/D)) * float(((1 / 2) ** func(i)))

print(ans) D, P = map(int, input().split()) D map(int, input().split()) map int input().split() ().split () input split P ans = 0.0 ans 0.0 def func(i):
    t = 0
    while(i < P):
        i *= 2
        t += 1
    return t func t = 0 t 0 while(i < P):
        i *= 2
        t += 1
     i < P i P i *= 2 i 2 t += 1 t 1 return t t i i for i in range(1, D + 1):
    ans += float((1/D)) * float(((1 / 2) ** func(i))) i range(1, D + 1) range 1 D + 1 D 1 ans += float((1/D)) * float(((1 / 2) ** func(i))) ans float((1/D)) * float(((1 / 2) ** func(i))) float((1/D)) float 1/D 1 D float(((1 / 2) ** func(i))) float (1 / 2) ** func(i) 1 / 2 1 2 func(i) func i print(ans) print ans ans = 0.0 0.0 ans def func(i):
    t = 0
    while(i < P):
        i *= 2
        t += 1
    return t def func(i):
    t = 0
    while(i < P):
        i *= 2
        t += 1
    return t func P = map(int, input().split()) map(int, input().split()) P D, P = map(int, input().split()) map(int, input().split()) D ans += float((1/D)) * float(((1 / 2) ** func(i))) float((1/D)) * float(((1 / 2) ** func(i))) ans
D, P = map(int, input().split())    
ans = 0.0
def func(i):
    t = 0
    while(i < P):
        i *= 2
        t += 1
    return t

for i in range(1, D + 1):
    ans += float((1/D)) * float(((1 / 2) ** func(i)))

print(ans)