import sys
import itertools
# import numpy as np
import time
import math
import heapq
from collections import defaultdict
sys.setrecursionlimit(10 ** 7)
 
INF = 10 ** 18
MOD = 10 ** 9 + 7
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

# map(int, input().split())

N, K = map(int, input().split())
ans = 0
for i in range(1, N + 1):
    x = i
    cnt = 0
    while i < K:
        i *= 2
        cnt += 1
    ans += (1 / N) * (1 / (2 ** cnt))
print(ans)

# def my_pow(base, n, mod):
#     if n == 0:
#         return 1
#     x = base
#     y = 1
#     while n > 1:
#         if n % 2 == 0:
#             x *= x
#             n //= 2
#         else:
#             y *= x
#             n -= 1
#         x %= mod
#         y %= mod
#     return x * y % mod import sys sys import itertools itertools import time time import math math import heapq heapq from collections import defaultdict sys.setrecursionlimit(10 ** 7) sys.setrecursionlimit sys setrecursionlimit 10 ** 7 10 7 INF = 10 ** 18 INF 10 ** 18 10 18 MOD = 10 ** 9 + 7 MOD 10 ** 9 + 7 10 ** 9 10 9 7 read = sys.stdin.buffer.read read sys.stdin.buffer.read sys.stdin.buffer sys.stdin sys stdin buffer read readline = sys.stdin.buffer.readline readline sys.stdin.buffer.readline sys.stdin.buffer sys.stdin sys stdin buffer readline readlines = sys.stdin.buffer.readlines readlines sys.stdin.buffer.readlines sys.stdin.buffer sys.stdin sys stdin buffer readlines 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):
    x = i
    cnt = 0
    while i < K:
        i *= 2
        cnt += 1
    ans += (1 / N) * (1 / (2 ** cnt)) i range(1, N + 1) range 1 N + 1 N 1 x = i x i cnt = 0 cnt 0 while i < K:
        i *= 2
        cnt += 1
     i < K i K i *= 2 i 2 cnt += 1 cnt 1 ans += (1 / N) * (1 / (2 ** cnt)) ans (1 / N) * (1 / (2 ** cnt)) 1 / N 1 N 1 / (2 ** cnt) 1 2 ** cnt 2 cnt print(ans) print ans MOD = 10 ** 9 + 7 10 ** 9 + 7 MOD readlines = sys.stdin.buffer.readlines sys.stdin.buffer.readlines readlines read = sys.stdin.buffer.read sys.stdin.buffer.read read cnt = 0 0 cnt N, K = map(int, input().split()) map(int, input().split()) N K = map(int, input().split()) map(int, input().split()) K x = i i x readline = sys.stdin.buffer.readline sys.stdin.buffer.readline readline ans += (1 / N) * (1 / (2 ** cnt)) (1 / N) * (1 / (2 ** cnt)) ans INF = 10 ** 18 10 ** 18 INF i *= 2 2 i ans = 0 0 ans cnt += 1 1 cnt
import sys
import itertools
# import numpy as np
import time
import math
import heapq
from collections import defaultdict
sys.setrecursionlimit(10 ** 7)
 
INF = 10 ** 18
MOD = 10 ** 9 + 7
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

# map(int, input().split())

N, K = map(int, input().split())
ans = 0
for i in range(1, N + 1):
    x = i
    cnt = 0
    while i < K:
        i *= 2
        cnt += 1
    ans += (1 / N) * (1 / (2 ** cnt))
print(ans)

# def my_pow(base, n, mod):
#     if n == 0:
#         return 1
#     x = base
#     y = 1
#     while n > 1:
#         if n % 2 == 0:
#             x *= x
#             n //= 2
#         else:
#             y *= x
#             n -= 1
#         x %= mod
#         y %= mod
#     return x * y % mod