import math
N, K = map(int, input().split())
ans = 0
for n in range(1, N+1):
    if n >= K:
        ans += 1/N
    else:
        ans += (1/N)*(1/2)**(math.ceil(math.log(K/n, 2)))
print(ans) import math math N, K = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split K ans = 0 ans 0 for n in range(1, N+1):
    if n >= K:
        ans += 1/N
    else:
        ans += (1/N)*(1/2)**(math.ceil(math.log(K/n, 2))) n range(1, N+1) range 1 N+1 N 1 if n >= K:
        ans += 1/N
    else:
        ans += (1/N)*(1/2)**(math.ceil(math.log(K/n, 2))) n >= K n K ans += 1/N ans 1/N 1 N ans += (1/N)*(1/2)**(math.ceil(math.log(K/n, 2))) ans (1/N)*(1/2)**(math.ceil(math.log(K/n, 2))) 1/N 1 N (1/2)**(math.ceil(math.log(K/n, 2))) 1/2 1 2 math.ceil(math.log(K/n, 2)) math.ceil math ceil math.log(K/n, 2) math.log math log K/n K n 2 print(ans) print ans ans = 0 0 ans ans += 1/N 1/N ans N, K = map(int, input().split()) map(int, input().split()) N ans += (1/N)*(1/2)**(math.ceil(math.log(K/n, 2))) (1/N)*(1/2)**(math.ceil(math.log(K/n, 2))) ans K = map(int, input().split()) map(int, input().split()) K
import math
N, K = map(int, input().split())
ans = 0
for n in range(1, N+1):
    if n >= K:
        ans += 1/N
    else:
        ans += (1/N)*(1/2)**(math.ceil(math.log(K/n, 2)))
print(ans)