import math

N, K = [int(x) for x in input().split()]

S = 0
for i in range(1, N + 1):
    a = 0
    while i < K:
        a += 1
        i *= 2
    S += 0.5 ** a

ans = S / N
print(ans) import math math int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x) int x N, K = [int(x) for x in input().split()] N [int(x) for x in input().split()] K S = 0 S 0 for i in range(1, N + 1):
    a = 0
    while i < K:
        a += 1
        i *= 2
    S += 0.5 ** a i range(1, N + 1) range 1 N + 1 N 1 a = 0 a 0 while i < K:
        a += 1
        i *= 2
     i < K i K a += 1 a 1 i *= 2 i 2 S += 0.5 ** a S 0.5 ** a 0.5 a ans = S / N ans S / N S N print(ans) print ans a = 0 0 a ans = S / N S / N ans a += 1 1 a i *= 2 2 i K = [int(x) for x in input().split()] [int(x) for x in input().split()] K S = 0 0 S S += 0.5 ** a 0.5 ** a S N, K = [int(x) for x in input().split()] [int(x) for x in input().split()] N
import math

N, K = [int(x) for x in input().split()]

S = 0
for i in range(1, N + 1):
    a = 0
    while i < K:
        a += 1
        i *= 2
    S += 0.5 ** a

ans = S / N
print(ans)