# 2020/07/23
# AtCoder Beginner Contest 126 - C
import math

# Input
n, k = map(int,input().split())

ans = 0

# Calc
for i in range(1, n+1):
    idx = 1
    wval = i
    while(wval < k):
        wval = wval * 2
        idx = idx + 1
    
    ans = ans + (1/n) * (1/2) ** idx

# Output
print(ans*2) 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 i in range(1, n+1):
    idx = 1
    wval = i
    while(wval < k):
        wval = wval * 2
        idx = idx + 1
    
    ans = ans + (1/n) * (1/2) ** idx

# Output i range(1, n+1) range 1 n+1 n 1 idx = 1 idx 1 wval = i wval i while(wval < k):
        wval = wval * 2
        idx = idx + 1
    
     wval < k wval k wval = wval * 2 wval wval * 2 wval 2 idx = idx + 1 idx idx + 1 idx 1 ans = ans + (1/n) * (1/2) ** idx ans ans + (1/n) * (1/2) ** idx ans (1/n) * (1/2) ** idx 1/n 1 n (1/2) ** idx 1/2 1 2 idx print(ans*2) print ans*2 ans 2 wval = i i wval wval = wval * 2 wval * 2 wval ans = 0 0 ans idx = idx + 1 idx + 1 idx idx = 1 1 idx k = map(int,input().split()) map(int,input().split()) k ans = ans + (1/n) * (1/2) ** idx ans + (1/n) * (1/2) ** idx ans n, k = map(int,input().split()) map(int,input().split()) n
# 2020/07/23
# AtCoder Beginner Contest 126 - C
import math

# Input
n, k = map(int,input().split())

ans = 0

# Calc
for i in range(1, n+1):
    idx = 1
    wval = i
    while(wval < k):
        wval = wval * 2
        idx = idx + 1
    
    ans = ans + (1/n) * (1/2) ** idx

# Output
print(ans*2)
