#!/usr/bin/env python3
import sys
import math
import decimal
import itertools
from itertools import product
from functools import reduce
def input():
    return sys.stdin.readline()[:-1]
def sort_zip(a:list, b:list):
    z = zip(a, b)
    z = sorted(z)
    a, b = zip(*z)
    a = list(a)
    b = list(b)
    return a, b

def main():
    N, K = map(int, input().split())

    p = 0
    for i in range(1, N + 1):
        a = K / i
        b = 1
        while b < a:
            b *= 2
        p += (1 / N) * (1 / b)
    print(p)


if __name__ == '__main__':
    main() import sys sys import math math import decimal decimal import itertools itertools from itertools import product from functools import reduce def input():
    return sys.stdin.readline()[:-1] input return sys.stdin.readline()[:-1] sys.stdin.readline()[:-1] sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline :-1 -1 def sort_zip(a:list, b:list):
    z = zip(a, b)
    z = sorted(z)
    a, b = zip(*z)
    a = list(a)
    b = list(b)
    return a, b sort_zip z = zip(a, b) z zip(a, b) zip a b z = sorted(z) z sorted(z) sorted z a, b = zip(*z) a zip(*z) zip *z z b a = list(a) a list(a) list a b = list(b) b list(b) list b return a, b return a, b a b a:list a b:list b def main():
    N, K = map(int, input().split())

    p = 0
    for i in range(1, N + 1):
        a = K / i
        b = 1
        while b < a:
            b *= 2
        p += (1 / N) * (1 / b)
    print(p) main N, K = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split K p = 0 p 0 for i in range(1, N + 1):
        a = K / i
        b = 1
        while b < a:
            b *= 2
        p += (1 / N) * (1 / b)
     i range(1, N + 1) range 1 N + 1 N 1 a = K / i a K / i K i b = 1 b 1 while b < a:
            b *= 2
         b < a b a b *= 2 b 2 p += (1 / N) * (1 / b) p (1 / N) * (1 / b) 1 / N 1 N 1 / b 1 b print(p) print p if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def input():
    return sys.stdin.readline()[:-1] def input():
    return sys.stdin.readline()[:-1] input def main():
    N, K = map(int, input().split())

    p = 0
    for i in range(1, N + 1):
        a = K / i
        b = 1
        while b < a:
            b *= 2
        p += (1 / N) * (1 / b)
    print(p) def main():
    N, K = map(int, input().split())

    p = 0
    for i in range(1, N + 1):
        a = K / i
        b = 1
        while b < a:
            b *= 2
        p += (1 / N) * (1 / b)
    print(p) main def sort_zip(a:list, b:list):
    z = zip(a, b)
    z = sorted(z)
    a, b = zip(*z)
    a = list(a)
    b = list(b)
    return a, b def sort_zip(a:list, b:list):
    z = zip(a, b)
    z = sorted(z)
    a, b = zip(*z)
    a = list(a)
    b = list(b)
    return a, b sort_zip
#!/usr/bin/env python3
import sys
import math
import decimal
import itertools
from itertools import product
from functools import reduce
def input():
    return sys.stdin.readline()[:-1]
def sort_zip(a:list, b:list):
    z = zip(a, b)
    z = sorted(z)
    a, b = zip(*z)
    a = list(a)
    b = list(b)
    return a, b

def main():
    N, K = map(int, input().split())

    p = 0
    for i in range(1, N + 1):
        a = K / i
        b = 1
        while b < a:
            b *= 2
        p += (1 / N) * (1 / b)
    print(p)


if __name__ == '__main__':
    main()
