#!/usr/bin/env python3
import math
import sys


def II():
    return int(sys.stdin.readline())


def MI():
    return map(int, sys.stdin.readline().split())


def LI():
    return list(map(int, sys.stdin.readline().split()))


def main():
    N, K = MI()
    ans = 0
    for n in range(1, N + 1):
        k = math.ceil(math.log2(K / n))
        ans += (1 / N) * min((1 / 2) ** k, 1)

    print(ans)


main() import math math import sys sys def II():
    return int(sys.stdin.readline()) II return int(sys.stdin.readline()) int(sys.stdin.readline()) int sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline def MI():
    return map(int, sys.stdin.readline().split()) MI return map(int, sys.stdin.readline().split()) map(int, sys.stdin.readline().split()) map int sys.stdin.readline().split() sys.stdin.readline().split sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline split def LI():
    return list(map(int, sys.stdin.readline().split())) LI return list(map(int, sys.stdin.readline().split())) list(map(int, sys.stdin.readline().split())) list map(int, sys.stdin.readline().split()) map int sys.stdin.readline().split() sys.stdin.readline().split sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline split def main():
    N, K = MI()
    ans = 0
    for n in range(1, N + 1):
        k = math.ceil(math.log2(K / n))
        ans += (1 / N) * min((1 / 2) ** k, 1)

    print(ans) main N, K = MI() N MI() MI K ans = 0 ans 0 for n in range(1, N + 1):
        k = math.ceil(math.log2(K / n))
        ans += (1 / N) * min((1 / 2) ** k, 1)

     n range(1, N + 1) range 1 N + 1 N 1 k = math.ceil(math.log2(K / n)) k math.ceil(math.log2(K / n)) math.ceil math ceil math.log2(K / n) math.log2 math log2 K / n K n ans += (1 / N) * min((1 / 2) ** k, 1) ans (1 / N) * min((1 / 2) ** k, 1) 1 / N 1 N min((1 / 2) ** k, 1) min (1 / 2) ** k 1 / 2 1 2 k 1 print(ans) print ans main() main def main():
    N, K = MI()
    ans = 0
    for n in range(1, N + 1):
        k = math.ceil(math.log2(K / n))
        ans += (1 / N) * min((1 / 2) ** k, 1)

    print(ans) def main():
    N, K = MI()
    ans = 0
    for n in range(1, N + 1):
        k = math.ceil(math.log2(K / n))
        ans += (1 / N) * min((1 / 2) ** k, 1)

    print(ans) main def LI():
    return list(map(int, sys.stdin.readline().split())) def LI():
    return list(map(int, sys.stdin.readline().split())) LI def II():
    return int(sys.stdin.readline()) def II():
    return int(sys.stdin.readline()) II def MI():
    return map(int, sys.stdin.readline().split()) def MI():
    return map(int, sys.stdin.readline().split()) MI
#!/usr/bin/env python3
import math
import sys


def II():
    return int(sys.stdin.readline())


def MI():
    return map(int, sys.stdin.readline().split())


def LI():
    return list(map(int, sys.stdin.readline().split()))


def main():
    N, K = MI()
    ans = 0
    for n in range(1, N + 1):
        k = math.ceil(math.log2(K / n))
        ans += (1 / N) * min((1 / 2) ** k, 1)

    print(ans)


main()
