# import sys
# input = sys.stdin.readline
import collections
import itertools

def main():
    n, k = input_list()
    res = 0.0
    for v in range(n):
        i = v + 1
        t = 1.0
        ii = i
        while ii < k:
            ii *= 2
            t /= 2.0
        res += t

    res /= n
    print(res)


def input_list():
    return list(map(int, input().split()))


def input_list_str():
    return list(map(str, input().split()))


if __name__ == "__main__":
    main() import collections collections import itertools itertools def main():
    n, k = input_list()
    res = 0.0
    for v in range(n):
        i = v + 1
        t = 1.0
        ii = i
        while ii < k:
            ii *= 2
            t /= 2.0
        res += t

    res /= n
    print(res) main n, k = input_list() n input_list() input_list k res = 0.0 res 0.0 for v in range(n):
        i = v + 1
        t = 1.0
        ii = i
        while ii < k:
            ii *= 2
            t /= 2.0
        res += t

     v range(n) range n i = v + 1 i v + 1 v 1 t = 1.0 t 1.0 ii = i ii i while ii < k:
            ii *= 2
            t /= 2.0
         ii < k ii k ii *= 2 ii 2 t /= 2.0 t 2.0 res += t res t res /= n res n print(res) print res def input_list():
    return list(map(int, input().split())) input_list return list(map(int, input().split())) list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split def input_list_str():
    return list(map(str, input().split())) input_list_str return list(map(str, input().split())) list(map(str, input().split())) list map(str, input().split()) map str input().split() ().split () input split if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main def input_list():
    return list(map(int, input().split())) def input_list():
    return list(map(int, input().split())) input_list def main():
    n, k = input_list()
    res = 0.0
    for v in range(n):
        i = v + 1
        t = 1.0
        ii = i
        while ii < k:
            ii *= 2
            t /= 2.0
        res += t

    res /= n
    print(res) def main():
    n, k = input_list()
    res = 0.0
    for v in range(n):
        i = v + 1
        t = 1.0
        ii = i
        while ii < k:
            ii *= 2
            t /= 2.0
        res += t

    res /= n
    print(res) main def input_list_str():
    return list(map(str, input().split())) def input_list_str():
    return list(map(str, input().split())) input_list_str
# import sys
# input = sys.stdin.readline
import collections
import itertools

def main():
    n, k = input_list()
    res = 0.0
    for v in range(n):
        i = v + 1
        t = 1.0
        ii = i
        while ii < k:
            ii *= 2
            t /= 2.0
        res += t

    res /= n
    print(res)


def input_list():
    return list(map(int, input().split()))


def input_list_str():
    return list(map(str, input().split()))


if __name__ == "__main__":
    main()
