from decimal import Decimal 
n, k = map(int, input().split())
count = 0
p = 0

if n >= k:
    a = n
    p += Decimal((a - k + 1) / a)
    n = k
    for i in range(k, 1, -1):
        n = n / i * (i - 1)
        while n < k:
            n *= 2
            count += 1
        p += Decimal(1 / a * (1 / 2) ** count)
    print(p)
else:
    a = n

    while n < k:
        n *= 2
        count += 1
    p += Decimal(1 / a * (1/2) ** count)

    for i in range(a, 1, -1):
        n = n / i * (i - 1)
        while n < k:
            n *= 2
            count += 1
        p += Decimal(1 / a * (1 / 2) ** count)
    print(p) from decimal import Decimal n, k = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split k count = 0 count 0 p = 0 p 0 if n >= k:
    a = n
    p += Decimal((a - k + 1) / a)
    n = k
    for i in range(k, 1, -1):
        n = n / i * (i - 1)
        while n < k:
            n *= 2
            count += 1
        p += Decimal(1 / a * (1 / 2) ** count)
    print(p)
else:
    a = n

    while n < k:
        n *= 2
        count += 1
    p += Decimal(1 / a * (1/2) ** count)

    for i in range(a, 1, -1):
        n = n / i * (i - 1)
        while n < k:
            n *= 2
            count += 1
        p += Decimal(1 / a * (1 / 2) ** count)
    print(p) n >= k n k a = n a n p += Decimal((a - k + 1) / a) p Decimal((a - k + 1) / a) Decimal (a - k + 1) / a a - k + 1 a - k a k 1 a n = k n k for i in range(k, 1, -1):
        n = n / i * (i - 1)
        while n < k:
            n *= 2
            count += 1
        p += Decimal(1 / a * (1 / 2) ** count)
     i range(k, 1, -1) range k 1 -1 n = n / i * (i - 1) n n / i * (i - 1) n / i n i i - 1 i 1 while n < k:
            n *= 2
            count += 1
         n < k n k n *= 2 n 2 count += 1 count 1 p += Decimal(1 / a * (1 / 2) ** count) p Decimal(1 / a * (1 / 2) ** count) Decimal 1 / a * (1 / 2) ** count 1 / a 1 a (1 / 2) ** count 1 / 2 1 2 count print(p) print p a = n a n while n < k:
        n *= 2
        count += 1
     n < k n k n *= 2 n 2 count += 1 count 1 p += Decimal(1 / a * (1/2) ** count) p Decimal(1 / a * (1/2) ** count) Decimal 1 / a * (1/2) ** count 1 / a 1 a (1/2) ** count 1/2 1 2 count for i in range(a, 1, -1):
        n = n / i * (i - 1)
        while n < k:
            n *= 2
            count += 1
        p += Decimal(1 / a * (1 / 2) ** count)
     i range(a, 1, -1) range a 1 -1 n = n / i * (i - 1) n n / i * (i - 1) n / i n i i - 1 i 1 while n < k:
            n *= 2
            count += 1
         n < k n k n *= 2 n 2 count += 1 count 1 p += Decimal(1 / a * (1 / 2) ** count) p Decimal(1 / a * (1 / 2) ** count) Decimal 1 / a * (1 / 2) ** count 1 / a 1 a (1 / 2) ** count 1 / 2 1 2 count print(p) print p count = 0 0 count n *= 2 2 n a = n n a n *= 2 2 n k = map(int, input().split()) map(int, input().split()) k p = 0 0 p n = n / i * (i - 1) n / i * (i - 1) n p += Decimal(1 / a * (1 / 2) ** count) Decimal(1 / a * (1 / 2) ** count) p p += Decimal((a - k + 1) / a) Decimal((a - k + 1) / a) p count += 1 1 count n = n / i * (i - 1) n / i * (i - 1) n p += Decimal(1 / a * (1 / 2) ** count) Decimal(1 / a * (1 / 2) ** count) p count += 1 1 count n, k = map(int, input().split()) map(int, input().split()) n n *= 2 2 n a = n n a count += 1 1 count n = k k n p += Decimal(1 / a * (1/2) ** count) Decimal(1 / a * (1/2) ** count) p
from decimal import Decimal 
n, k = map(int, input().split())
count = 0
p = 0

if n >= k:
    a = n
    p += Decimal((a - k + 1) / a)
    n = k
    for i in range(k, 1, -1):
        n = n / i * (i - 1)
        while n < k:
            n *= 2
            count += 1
        p += Decimal(1 / a * (1 / 2) ** count)
    print(p)
else:
    a = n

    while n < k:
        n *= 2
        count += 1
    p += Decimal(1 / a * (1/2) ** count)

    for i in range(a, 1, -1):
        n = n / i * (i - 1)
        while n < k:
            n *= 2
            count += 1
        p += Decimal(1 / a * (1 / 2) ** count)
    print(p)