import math

def main():
    N, K = map(int, input().split())
    prob = 0
    for i in range(1, N+1):
        if K / i <= 1:
            prob += 1
        else:
            coin = math.ceil(math.log2(K / i))
            prob += 0.5 ** coin
    print(prob / N)


if __name__ == '__main__':
    main() import math math def main():
    N, K = map(int, input().split())
    prob = 0
    for i in range(1, N+1):
        if K / i <= 1:
            prob += 1
        else:
            coin = math.ceil(math.log2(K / i))
            prob += 0.5 ** coin
    print(prob / N) main N, K = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split K prob = 0 prob 0 for i in range(1, N+1):
        if K / i <= 1:
            prob += 1
        else:
            coin = math.ceil(math.log2(K / i))
            prob += 0.5 ** coin
     i range(1, N+1) range 1 N+1 N 1 if K / i <= 1:
            prob += 1
        else:
            coin = math.ceil(math.log2(K / i))
            prob += 0.5 ** coin
     K / i <= 1 K / i K i 1 prob += 1 prob 1 coin = math.ceil(math.log2(K / i)) coin math.ceil(math.log2(K / i)) math.ceil math ceil math.log2(K / i) math.log2 math log2 K / i K i prob += 0.5 ** coin prob 0.5 ** coin 0.5 coin print(prob / N) print prob / N prob N if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def main():
    N, K = map(int, input().split())
    prob = 0
    for i in range(1, N+1):
        if K / i <= 1:
            prob += 1
        else:
            coin = math.ceil(math.log2(K / i))
            prob += 0.5 ** coin
    print(prob / N) def main():
    N, K = map(int, input().split())
    prob = 0
    for i in range(1, N+1):
        if K / i <= 1:
            prob += 1
        else:
            coin = math.ceil(math.log2(K / i))
            prob += 0.5 ** coin
    print(prob / N) main
import math

def main():
    N, K = map(int, input().split())
    prob = 0
    for i in range(1, N+1):
        if K / i <= 1:
            prob += 1
        else:
            coin = math.ceil(math.log2(K / i))
            prob += 0.5 ** coin
    print(prob / N)


if __name__ == '__main__':
    main()
