/*
String[]の初期化、整数の型がlongになっているか
関数（splitとかcontainsとか）内では"+"とかは正規表現となされるので"\\+"とする
配列のコピーはarr1=arr.clone()
HashSet<>[]はおのおの初期化した？？？？？
負の数の割り算は絶対値が小さいほうに切り捨てられるex.-1/2=0ので、ある値>kみたいな式だとバグらせやすいので注意
ある値>=kとして、切り上げた値をとるべき
toLowerCase()はアルファベット以外に対して行ってもエラーにはならない
ArrayDequeではpopとpushはStackと同じ操作になる
//import static java.lang.System.*; はしばらく使わなそう(使うとしてもexit(0)のためだけ)←return;でよさそう
最後にout.flush()またはout.close()をするのを忘れずに！
Point2D p2d=new Point2D.Double(d1,d2);
//import static java.lang.System.*;
*/
//入力終了→Ctrl+D
import java.lang.reflect.Array;
import java.math.BigDecimal;
import java.net.Inet4Address;
import java.util.*;
import java.io.*;
import java.awt.*;
import java.awt.geom.Point2D;
import static java.lang.Math.*;
public class Main {
    public static void main(String[] $) {
        int n=sc.nextInt(),k=sc.nextInt();
        double ans=0;
        for (int i = 1; i <= n; i++) {
            int now=i;
            double t=1.0/n;
            while (now<k){
                now*=2;
                t/=2;
            }
            ans+=t;
        }
        out.println(ans);
        out.close();
    }

    static boolean nextPermutation(int[] a) {
        int t = a.length - 1;
        int tt = t + 1;
        for (int i = t; i > 0; --i) {
            if (a[i - 1] < a[i]) {
                int swapIndex = Find(a[i - 1], a, i, t);
                int temp = a[swapIndex];
                a[swapIndex] = a[i - 1];
                a[i - 1] = temp;
                Arrays.sort(a, i, tt);
                return true;
            }
        }
        return false;
    }

    static int Find(int dest, int[] a, int s, int e) {
        if (s == e) {
            return s;
        }
        int m = (s + e + 1) / 2;
        return a[m] <= dest ? Find(dest, a, s, m - 1) : Find(dest, a, m, e);
    }

    static class pair {
        long x, y;

        pair(long a, long b) {
            a = x;
            b = y;
        }
    }

    static class Point3D {
        Point3D(int a, int b, int c) {
            a = x;
            b = y;
            c = z;
        }

        int x, y, z;
    }

    static long mod = 1000000007;

    static long power(long x, long n) {
        if (n == 0) return 1;
        if (n % 2 == 0) {
            long e = power(x, n / 2) % mod;
            return (e * e) % mod;
        }
        return (x * power(x, n - 1)) % mod;
    }

    static long gcd(long a, long b) {
        return b == 0 ? a : gcd(b, a % b);
    }

    static class COM {
        static long[] fact;
        static long[] inv;

        static void Init(int n) {
            fact = new long[n];
            inv = new long[n];
            fact[0] = inv[0] = 1;
            for (int i = 1; i < n; i++) {
                fact[i] = (fact[i - 1] * i) % mod;
                inv[i] = power(fact[i], mod - 2);
            }
        }

        static long C(int n, int k) {
            if (k > n) return 0;
            return ((fact[n] * inv[n - k]) % mod * inv[k]) % mod;
        }
    }

    static class UF {
        static int[] d;

        static void Init(int size) {
            d = new int[size];
            for (int i = 0; i < size; i++) {
                d[i] = -1;
            }
        }

        static boolean unite(int x, int y) {
            x = find(x);
            y = find(y);
            if (x == y) return false;
            if (d[x] > d[y]) {
                int t = d[y];
                d[y] = d[x];
                d[x] = t;
            }
            d[x] += d[y];
            d[y] = x;
            return true;
        }

        static boolean same(int x, int y) {
            return find(x) == find(y);
        }

        static int find(int k) {
            return d[k] < 0 ? k : (d[k] = find(d[k]));
        }

        static int size(int k) {
            return -d[find(k)];
        }
    }

    static class ST {
        //0-indexed
        //親:(n-1)/2,子:2*n+1,2*n+2
        //i番目のindex→n+i-1
        static long INF = 0;
        static int n = 131072;
        static long[] d = new long[n * 2 - 1];

        static void Init() {
            for (int i = 0; i < n * 2 - 1; i++) d[i] = INF;
        }

        //i番目の要素をxに変更（この関数はnが2の累乗でないと機能しない）
        static void update(int i, long x) {
            i += n - 1;
            d[i] = x;
            while (i > 0) {
                i = (i - 1) / 2;
                d[i] = gcd(d[i * 2 + 1], d[i * 2 + 2]);
            }
        }

        //[a,b)の最小値,l,rにはノードkに対応付く区間を与える
        static long query(int a, int b, int k, int l, int r) {
            if (r <= a || b <= l) return INF;
            if (a <= l && r <= b) return d[k];
            long vl = query(a, b, k * 2 + 1, l, (l + r) / 2);
            long vr = query(a, b, k * 2 + 2, (l + r) / 2, r);
            return gcd(vl, vr);
        }
        //ex.[a,b)のmin→query(a,b,0,0,ST.n)
    }

    static void WF(long[][] d, int[] a, int[] b, long[] c) {
        int n = a.length;
        long INF = 100000000000l;
        for (int i = 0; i < n; i++) {
            for (int j = i; j < n; j++) {
                d[i][j] = d[j][i] = INF;
            }
        }
        for (int i = 0; i < n; i++) {
            d[a[i]][b[i]] = d[b[i]][a[i]] = c[i];
        }
        for (int k = 0; k < n; k++) {
            for (int i = 0; i < n; i++) {
                for (int j = 0; j < n; j++) {
                    d[i][j] = d[i][j] > d[i][k] + d[k][j] ? d[i][k] + d[k][j] : d[i][j];
                }
            }
        }
    }

    static PrintWriter out = new PrintWriter(System.out);

    static class sc {
        static Scanner s = new Scanner(System.in);

        static String next() {
            return s.next();
        }

        static String nextLine() {
            return s.nextLine();
        }

        static int nextInt() {
            return Integer.parseInt(s.next());
        }

        static long nextLong() {
            return Long.parseLong(s.next());
        }

        static double nextDouble() {
            return Double.parseDouble(s.next());
        }

        static boolean hasNext() {
            return s.hasNext();
        }
    }

} import java.lang.reflect.Array; Array java.lang.reflect import java.math.BigDecimal; BigDecimal java.math import java.net.Inet4Address; Inet4Address java.net import java.util.*; util.* java import java.io.*; io.* java import java.awt.*; awt.* java import java.awt.geom.Point2D; Point2D java.awt.geom import static java.lang.Math.*; import static java.lang.Math.*; import static java.lang.Math.*; public class Main {
    public static void main(String[] $) {
        int n=sc.nextInt(),k=sc.nextInt();
        double ans=0;
        for (int i = 1; i <= n; i++) {
            int now=i;
            double t=1.0/n;
            while (now<k){
                now*=2;
                t/=2;
            }
            ans+=t;
        }
        out.println(ans);
        out.close();
    }

    static boolean nextPermutation(int[] a) {
        int t = a.length - 1;
        int tt = t + 1;
        for (int i = t; i > 0; --i) {
            if (a[i - 1] < a[i]) {
                int swapIndex = Find(a[i - 1], a, i, t);
                int temp = a[swapIndex];
                a[swapIndex] = a[i - 1];
                a[i - 1] = temp;
                Arrays.sort(a, i, tt);
                return true;
            }
        }
        return false;
    }

    static int Find(int dest, int[] a, int s, int e) {
        if (s == e) {
            return s;
        }
        int m = (s + e + 1) / 2;
        return a[m] <= dest ? Find(dest, a, s, m - 1) : Find(dest, a, m, e);
    }

    static class pair {
        long x, y;

        pair(long a, long b) {
            a = x;
            b = y;
        }
    }

    static class Point3D {
        Point3D(int a, int b, int c) {
            a = x;
            b = y;
            c = z;
        }

        int x, y, z;
    }

    static long mod = 1000000007;

    static long power(long x, long n) {
        if (n == 0) return 1;
        if (n % 2 == 0) {
            long e = power(x, n / 2) % mod;
            return (e * e) % mod;
        }
        return (x * power(x, n - 1)) % mod;
    }

    static long gcd(long a, long b) {
        return b == 0 ? a : gcd(b, a % b);
    }

    static class COM {
        static long[] fact;
        static long[] inv;

        static void Init(int n) {
            fact = new long[n];
            inv = new long[n];
            fact[0] = inv[0] = 1;
            for (int i = 1; i < n; i++) {
                fact[i] = (fact[i - 1] * i) % mod;
                inv[i] = power(fact[i], mod - 2);
            }
        }

        static long C(int n, int k) {
            if (k > n) return 0;
            return ((fact[n] * inv[n - k]) % mod * inv[k]) % mod;
        }
    }

    static class UF {
        static int[] d;

        static void Init(int size) {
            d = new int[size];
            for (int i = 0; i < size; i++) {
                d[i] = -1;
            }
        }

        static boolean unite(int x, int y) {
            x = find(x);
            y = find(y);
            if (x == y) return false;
            if (d[x] > d[y]) {
                int t = d[y];
                d[y] = d[x];
                d[x] = t;
            }
            d[x] += d[y];
            d[y] = x;
            return true;
        }

        static boolean same(int x, int y) {
            return find(x) == find(y);
        }

        static int find(int k) {
            return d[k] < 0 ? k : (d[k] = find(d[k]));
        }

        static int size(int k) {
            return -d[find(k)];
        }
    }

    static class ST {
        //0-indexed
        //親:(n-1)/2,子:2*n+1,2*n+2
        //i番目のindex→n+i-1
        static long INF = 0;
        static int n = 131072;
        static long[] d = new long[n * 2 - 1];

        static void Init() {
            for (int i = 0; i < n * 2 - 1; i++) d[i] = INF;
        }

        //i番目の要素をxに変更（この関数はnが2の累乗でないと機能しない）
        static void update(int i, long x) {
            i += n - 1;
            d[i] = x;
            while (i > 0) {
                i = (i - 1) / 2;
                d[i] = gcd(d[i * 2 + 1], d[i * 2 + 2]);
            }
        }

        //[a,b)の最小値,l,rにはノードkに対応付く区間を与える
        static long query(int a, int b, int k, int l, int r) {
            if (r <= a || b <= l) return INF;
            if (a <= l && r <= b) return d[k];
            long vl = query(a, b, k * 2 + 1, l, (l + r) / 2);
            long vr = query(a, b, k * 2 + 2, (l + r) / 2, r);
            return gcd(vl, vr);
        }
        //ex.[a,b)のmin→query(a,b,0,0,ST.n)
    }

    static void WF(long[][] d, int[] a, int[] b, long[] c) {
        int n = a.length;
        long INF = 100000000000l;
        for (int i = 0; i < n; i++) {
            for (int j = i; j < n; j++) {
                d[i][j] = d[j][i] = INF;
            }
        }
        for (int i = 0; i < n; i++) {
            d[a[i]][b[i]] = d[b[i]][a[i]] = c[i];
        }
        for (int k = 0; k < n; k++) {
            for (int i = 0; i < n; i++) {
                for (int j = 0; j < n; j++) {
                    d[i][j] = d[i][j] > d[i][k] + d[k][j] ? d[i][k] + d[k][j] : d[i][j];
                }
            }
        }
    }

    static PrintWriter out = new PrintWriter(System.out);

    static class sc {
        static Scanner s = new Scanner(System.in);

        static String next() {
            return s.next();
        }

        static String nextLine() {
            return s.nextLine();
        }

        static int nextInt() {
            return Integer.parseInt(s.next());
        }

        static long nextLong() {
            return Long.parseLong(s.next());
        }

        static double nextDouble() {
            return Double.parseDouble(s.next());
        }

        static boolean hasNext() {
            return s.hasNext();
        }
    }

} Main static long mod = 1000000007; mod 1000000007 static PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) public static void main(String[] $) {
        int n=sc.nextInt(),k=sc.nextInt();
        double ans=0;
        for (int i = 1; i <= n; i++) {
            int now=i;
            double t=1.0/n;
            while (now<k){
                now*=2;
                t/=2;
            }
            ans+=t;
        }
        out.println(ans);
        out.close();
    } main {
        int n=sc.nextInt(),k=sc.nextInt();
        double ans=0;
        for (int i = 1; i <= n; i++) {
            int now=i;
            double t=1.0/n;
            while (now<k){
                now*=2;
                t/=2;
            }
            ans+=t;
        }
        out.println(ans);
        out.close();
    } int n=sc.nextInt() n sc.nextInt() sc.nextInt sc k=sc.nextInt(); k sc.nextInt() sc.nextInt sc double ans=0; ans 0 for (int i = 1; i <= n; i++) {
            int now=i;
            double t=1.0/n;
            while (now<k){
                now*=2;
                t/=2;
            }
            ans+=t;
        } int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
            int now=i;
            double t=1.0/n;
            while (now<k){
                now*=2;
                t/=2;
            }
            ans+=t;
        } {
            int now=i;
            double t=1.0/n;
            while (now<k){
                now*=2;
                t/=2;
            }
            ans+=t;
        } int now=i; now i double t=1.0/n; t 1.0/n 1.0 n while (now<k){
                now*=2;
                t/=2;
            } now<k now k {
                now*=2;
                t/=2;
            } now*=2 now 2 t/=2 t 2 ans+=t ans t out.println(ans) out.println out ans out.close() out.close out String[] $ $ static boolean nextPermutation(int[] a) {
        int t = a.length - 1;
        int tt = t + 1;
        for (int i = t; i > 0; --i) {
            if (a[i - 1] < a[i]) {
                int swapIndex = Find(a[i - 1], a, i, t);
                int temp = a[swapIndex];
                a[swapIndex] = a[i - 1];
                a[i - 1] = temp;
                Arrays.sort(a, i, tt);
                return true;
            }
        }
        return false;
    } nextPermutation {
        int t = a.length - 1;
        int tt = t + 1;
        for (int i = t; i > 0; --i) {
            if (a[i - 1] < a[i]) {
                int swapIndex = Find(a[i - 1], a, i, t);
                int temp = a[swapIndex];
                a[swapIndex] = a[i - 1];
                a[i - 1] = temp;
                Arrays.sort(a, i, tt);
                return true;
            }
        }
        return false;
    } int t = a.length - 1; t a.length - 1 a.length a a.length 1 int tt = t + 1; tt t + 1 t 1 for (int i = t; i > 0; --i) {
            if (a[i - 1] < a[i]) {
                int swapIndex = Find(a[i - 1], a, i, t);
                int temp = a[swapIndex];
                a[swapIndex] = a[i - 1];
                a[i - 1] = temp;
                Arrays.sort(a, i, tt);
                return true;
            }
        } int i = t; int i = t; i t i > 0 i 0 --i --i i {
            if (a[i - 1] < a[i]) {
                int swapIndex = Find(a[i - 1], a, i, t);
                int temp = a[swapIndex];
                a[swapIndex] = a[i - 1];
                a[i - 1] = temp;
                Arrays.sort(a, i, tt);
                return true;
            }
        } {
            if (a[i - 1] < a[i]) {
                int swapIndex = Find(a[i - 1], a, i, t);
                int temp = a[swapIndex];
                a[swapIndex] = a[i - 1];
                a[i - 1] = temp;
                Arrays.sort(a, i, tt);
                return true;
            }
        } if (a[i - 1] < a[i]) {
                int swapIndex = Find(a[i - 1], a, i, t);
                int temp = a[swapIndex];
                a[swapIndex] = a[i - 1];
                a[i - 1] = temp;
                Arrays.sort(a, i, tt);
                return true;
            } a[i - 1] < a[i] a[i - 1] a i - 1 i 1 a[i] a i {
                int swapIndex = Find(a[i - 1], a, i, t);
                int temp = a[swapIndex];
                a[swapIndex] = a[i - 1];
                a[i - 1] = temp;
                Arrays.sort(a, i, tt);
                return true;
            } int swapIndex = Find(a[i - 1], a, i, t); swapIndex Find(a[i - 1], a, i, t) Find a[i - 1] a i - 1 i 1 a i t int temp = a[swapIndex]; temp a[swapIndex] a swapIndex a[swapIndex] = a[i - 1] a[swapIndex] a swapIndex a[i - 1] a i - 1 i 1 a[i - 1] = temp a[i - 1] a i - 1 i 1 temp Arrays.sort(a, i, tt) Arrays.sort Arrays a i tt return true; true return false; false int[] a a static int Find(int dest, int[] a, int s, int e) {
        if (s == e) {
            return s;
        }
        int m = (s + e + 1) / 2;
        return a[m] <= dest ? Find(dest, a, s, m - 1) : Find(dest, a, m, e);
    } Find {
        if (s == e) {
            return s;
        }
        int m = (s + e + 1) / 2;
        return a[m] <= dest ? Find(dest, a, s, m - 1) : Find(dest, a, m, e);
    } if (s == e) {
            return s;
        } s == e s e {
            return s;
        } return s; s int m = (s + e + 1) / 2; m (s + e + 1) / 2 (s + e + 1) s + e + 1 s e 1 2 return a[m] <= dest ? Find(dest, a, s, m - 1) : Find(dest, a, m, e); a[m] <= dest ? Find(dest, a, s, m - 1) : Find(dest, a, m, e) a[m] <= dest a[m] a m dest Find(dest, a, s, m - 1) Find dest a s m - 1 m 1 Find(dest, a, m, e) Find dest a m e int dest dest int[] a a int s s int e e static long power(long x, long n) {
        if (n == 0) return 1;
        if (n % 2 == 0) {
            long e = power(x, n / 2) % mod;
            return (e * e) % mod;
        }
        return (x * power(x, n - 1)) % mod;
    } power {
        if (n == 0) return 1;
        if (n % 2 == 0) {
            long e = power(x, n / 2) % mod;
            return (e * e) % mod;
        }
        return (x * power(x, n - 1)) % mod;
    } if (n == 0) return 1; n == 0 n 0 return 1; 1 if (n % 2 == 0) {
            long e = power(x, n / 2) % mod;
            return (e * e) % mod;
        } n % 2 == 0 n % 2 n 2 0 {
            long e = power(x, n / 2) % mod;
            return (e * e) % mod;
        } long e = power(x, n / 2) % mod; e power(x, n / 2) % mod power(x, n / 2) power x n / 2 n 2 mod return (e * e) % mod; (e * e) % mod (e * e) e e mod return (x * power(x, n - 1)) % mod; (x * power(x, n - 1)) % mod (x * power(x, n - 1)) x power(x, n - 1) power x n - 1 n 1 mod long x x long n n static long gcd(long a, long b) {
        return b == 0 ? a : gcd(b, a % b);
    } gcd {
        return b == 0 ? a : gcd(b, a % b);
    } return b == 0 ? a : gcd(b, a % b); b == 0 ? a : gcd(b, a % b) b == 0 b 0 a gcd(b, a % b) gcd b a % b a b long a a long b b static void WF(long[][] d, int[] a, int[] b, long[] c) {
        int n = a.length;
        long INF = 100000000000l;
        for (int i = 0; i < n; i++) {
            for (int j = i; j < n; j++) {
                d[i][j] = d[j][i] = INF;
            }
        }
        for (int i = 0; i < n; i++) {
            d[a[i]][b[i]] = d[b[i]][a[i]] = c[i];
        }
        for (int k = 0; k < n; k++) {
            for (int i = 0; i < n; i++) {
                for (int j = 0; j < n; j++) {
                    d[i][j] = d[i][j] > d[i][k] + d[k][j] ? d[i][k] + d[k][j] : d[i][j];
                }
            }
        }
    } WF {
        int n = a.length;
        long INF = 100000000000l;
        for (int i = 0; i < n; i++) {
            for (int j = i; j < n; j++) {
                d[i][j] = d[j][i] = INF;
            }
        }
        for (int i = 0; i < n; i++) {
            d[a[i]][b[i]] = d[b[i]][a[i]] = c[i];
        }
        for (int k = 0; k < n; k++) {
            for (int i = 0; i < n; i++) {
                for (int j = 0; j < n; j++) {
                    d[i][j] = d[i][j] > d[i][k] + d[k][j] ? d[i][k] + d[k][j] : d[i][j];
                }
            }
        }
    } int n = a.length; n a.length a a.length long INF = 100000000000l; INF 100000000000l for (int i = 0; i < n; i++) {
            for (int j = i; j < n; j++) {
                d[i][j] = d[j][i] = INF;
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            for (int j = i; j < n; j++) {
                d[i][j] = d[j][i] = INF;
            }
        } {
            for (int j = i; j < n; j++) {
                d[i][j] = d[j][i] = INF;
            }
        } for (int j = i; j < n; j++) {
                d[i][j] = d[j][i] = INF;
            } int j = i; int j = i; j i j < n j n j++ j++ j {
                d[i][j] = d[j][i] = INF;
            } {
                d[i][j] = d[j][i] = INF;
            } d[i][j] = d[j][i] = INF d[i][j] d[i] d i j d[j][i] = INF d[j][i] d[j] d j i INF for (int i = 0; i < n; i++) {
            d[a[i]][b[i]] = d[b[i]][a[i]] = c[i];
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            d[a[i]][b[i]] = d[b[i]][a[i]] = c[i];
        } {
            d[a[i]][b[i]] = d[b[i]][a[i]] = c[i];
        } d[a[i]][b[i]] = d[b[i]][a[i]] = c[i] d[a[i]][b[i]] d[a[i]] d a[i] a i b[i] b i d[b[i]][a[i]] = c[i] d[b[i]][a[i]] d[b[i]] d b[i] b i a[i] a i c[i] c i for (int k = 0; k < n; k++) {
            for (int i = 0; i < n; i++) {
                for (int j = 0; j < n; j++) {
                    d[i][j] = d[i][j] > d[i][k] + d[k][j] ? d[i][k] + d[k][j] : d[i][j];
                }
            }
        } int k = 0; int k = 0; k 0 k < n k n k++ k++ k {
            for (int i = 0; i < n; i++) {
                for (int j = 0; j < n; j++) {
                    d[i][j] = d[i][j] > d[i][k] + d[k][j] ? d[i][k] + d[k][j] : d[i][j];
                }
            }
        } {
            for (int i = 0; i < n; i++) {
                for (int j = 0; j < n; j++) {
                    d[i][j] = d[i][j] > d[i][k] + d[k][j] ? d[i][k] + d[k][j] : d[i][j];
                }
            }
        } for (int i = 0; i < n; i++) {
                for (int j = 0; j < n; j++) {
                    d[i][j] = d[i][j] > d[i][k] + d[k][j] ? d[i][k] + d[k][j] : d[i][j];
                }
            } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
                for (int j = 0; j < n; j++) {
                    d[i][j] = d[i][j] > d[i][k] + d[k][j] ? d[i][k] + d[k][j] : d[i][j];
                }
            } {
                for (int j = 0; j < n; j++) {
                    d[i][j] = d[i][j] > d[i][k] + d[k][j] ? d[i][k] + d[k][j] : d[i][j];
                }
            } for (int j = 0; j < n; j++) {
                    d[i][j] = d[i][j] > d[i][k] + d[k][j] ? d[i][k] + d[k][j] : d[i][j];
                } int j = 0; int j = 0; j 0 j < n j n j++ j++ j {
                    d[i][j] = d[i][j] > d[i][k] + d[k][j] ? d[i][k] + d[k][j] : d[i][j];
                } {
                    d[i][j] = d[i][j] > d[i][k] + d[k][j] ? d[i][k] + d[k][j] : d[i][j];
                } d[i][j] = d[i][j] > d[i][k] + d[k][j] ? d[i][k] + d[k][j] : d[i][j] d[i][j] d[i] d i j d[i][j] > d[i][k] + d[k][j] ? d[i][k] + d[k][j] : d[i][j] d[i][j] > d[i][k] + d[k][j] d[i][j] d[i] d i j d[i][k] + d[k][j] d[i][k] d[i] d i k d[k][j] d[k] d k j d[i][k] + d[k][j] d[i][k] d[i] d i k d[k][j] d[k] d k j d[i][j] d[i] d i j long[][] d d int[] a a int[] b b long[] c c static class pair {
        long x, y;

        pair(long a, long b) {
            a = x;
            b = y;
        }
    } pair long x x y; y pair(long a, long b) {
            a = x;
            b = y;
        } pair {
            a = x;
            b = y;
        } a = x a x b = y b y long a a long b b static class Point3D {
        Point3D(int a, int b, int c) {
            a = x;
            b = y;
            c = z;
        }

        int x, y, z;
    } Point3D int x x y y z; z Point3D(int a, int b, int c) {
            a = x;
            b = y;
            c = z;
        } Point3D {
            a = x;
            b = y;
            c = z;
        } a = x a x b = y b y c = z c z int a a int b b int c c static class COM {
        static long[] fact;
        static long[] inv;

        static void Init(int n) {
            fact = new long[n];
            inv = new long[n];
            fact[0] = inv[0] = 1;
            for (int i = 1; i < n; i++) {
                fact[i] = (fact[i - 1] * i) % mod;
                inv[i] = power(fact[i], mod - 2);
            }
        }

        static long C(int n, int k) {
            if (k > n) return 0;
            return ((fact[n] * inv[n - k]) % mod * inv[k]) % mod;
        }
    } COM static long[] fact; fact static long[] inv; inv static void Init(int n) {
            fact = new long[n];
            inv = new long[n];
            fact[0] = inv[0] = 1;
            for (int i = 1; i < n; i++) {
                fact[i] = (fact[i - 1] * i) % mod;
                inv[i] = power(fact[i], mod - 2);
            }
        } Init {
            fact = new long[n];
            inv = new long[n];
            fact[0] = inv[0] = 1;
            for (int i = 1; i < n; i++) {
                fact[i] = (fact[i - 1] * i) % mod;
                inv[i] = power(fact[i], mod - 2);
            }
        } fact = new long[n] fact new long[n] n inv = new long[n] inv new long[n] n fact[0] = inv[0] = 1 fact[0] fact 0 inv[0] = 1 inv[0] inv 0 1 for (int i = 1; i < n; i++) {
                fact[i] = (fact[i - 1] * i) % mod;
                inv[i] = power(fact[i], mod - 2);
            } int i = 1; int i = 1; i 1 i < n i n i++ i++ i {
                fact[i] = (fact[i - 1] * i) % mod;
                inv[i] = power(fact[i], mod - 2);
            } {
                fact[i] = (fact[i - 1] * i) % mod;
                inv[i] = power(fact[i], mod - 2);
            } fact[i] = (fact[i - 1] * i) % mod fact[i] fact i (fact[i - 1] * i) % mod (fact[i - 1] * i) fact[i - 1] fact i - 1 i 1 i mod inv[i] = power(fact[i], mod - 2) inv[i] inv i power(fact[i], mod - 2) power fact[i] fact i mod - 2 mod 2 int n n static long C(int n, int k) {
            if (k > n) return 0;
            return ((fact[n] * inv[n - k]) % mod * inv[k]) % mod;
        } C {
            if (k > n) return 0;
            return ((fact[n] * inv[n - k]) % mod * inv[k]) % mod;
        } if (k > n) return 0; k > n k n return 0; 0 return ((fact[n] * inv[n - k]) % mod * inv[k]) % mod; ((fact[n] * inv[n - k]) % mod * inv[k]) % mod ((fact[n] * inv[n - k]) % mod * inv[k]) (fact[n] * inv[n - k]) % mod (fact[n] * inv[n - k]) fact[n] fact n inv[n - k] inv n - k n k mod inv[k] inv k mod int n n int k k static class UF {
        static int[] d;

        static void Init(int size) {
            d = new int[size];
            for (int i = 0; i < size; i++) {
                d[i] = -1;
            }
        }

        static boolean unite(int x, int y) {
            x = find(x);
            y = find(y);
            if (x == y) return false;
            if (d[x] > d[y]) {
                int t = d[y];
                d[y] = d[x];
                d[x] = t;
            }
            d[x] += d[y];
            d[y] = x;
            return true;
        }

        static boolean same(int x, int y) {
            return find(x) == find(y);
        }

        static int find(int k) {
            return d[k] < 0 ? k : (d[k] = find(d[k]));
        }

        static int size(int k) {
            return -d[find(k)];
        }
    } UF static int[] d; d static void Init(int size) {
            d = new int[size];
            for (int i = 0; i < size; i++) {
                d[i] = -1;
            }
        } Init {
            d = new int[size];
            for (int i = 0; i < size; i++) {
                d[i] = -1;
            }
        } d = new int[size] d new int[size] size for (int i = 0; i < size; i++) {
                d[i] = -1;
            } int i = 0; int i = 0; i 0 i < size i size i++ i++ i {
                d[i] = -1;
            } {
                d[i] = -1;
            } d[i] = -1 d[i] d i -1 1 int size size static boolean unite(int x, int y) {
            x = find(x);
            y = find(y);
            if (x == y) return false;
            if (d[x] > d[y]) {
                int t = d[y];
                d[y] = d[x];
                d[x] = t;
            }
            d[x] += d[y];
            d[y] = x;
            return true;
        } unite {
            x = find(x);
            y = find(y);
            if (x == y) return false;
            if (d[x] > d[y]) {
                int t = d[y];
                d[y] = d[x];
                d[x] = t;
            }
            d[x] += d[y];
            d[y] = x;
            return true;
        } x = find(x) x find(x) find x y = find(y) y find(y) find y if (x == y) return false; x == y x y return false; false if (d[x] > d[y]) {
                int t = d[y];
                d[y] = d[x];
                d[x] = t;
            } d[x] > d[y] d[x] d x d[y] d y {
                int t = d[y];
                d[y] = d[x];
                d[x] = t;
            } int t = d[y]; t d[y] d y d[y] = d[x] d[y] d y d[x] d x d[x] = t d[x] d x t d[x] += d[y] d[x] d x d[y] d y d[y] = x d[y] d y x return true; true int x x int y y static boolean same(int x, int y) {
            return find(x) == find(y);
        } same {
            return find(x) == find(y);
        } return find(x) == find(y); find(x) == find(y) find(x) find x find(y) find y int x x int y y static int find(int k) {
            return d[k] < 0 ? k : (d[k] = find(d[k]));
        } find {
            return d[k] < 0 ? k : (d[k] = find(d[k]));
        } return d[k] < 0 ? k : (d[k] = find(d[k])); d[k] < 0 ? k : (d[k] = find(d[k])) d[k] < 0 d[k] d k 0 k (d[k] = find(d[k])) d[k] d k find(d[k]) find d[k] d k int k k static int size(int k) {
            return -d[find(k)];
        } size {
            return -d[find(k)];
        } return -d[find(k)]; -d[find(k)] d[find(k)] d find(k) find k int k k static class ST {
        //0-indexed
        //親:(n-1)/2,子:2*n+1,2*n+2
        //i番目のindex→n+i-1
        static long INF = 0;
        static int n = 131072;
        static long[] d = new long[n * 2 - 1];

        static void Init() {
            for (int i = 0; i < n * 2 - 1; i++) d[i] = INF;
        }

        //i番目の要素をxに変更（この関数はnが2の累乗でないと機能しない）
        static void update(int i, long x) {
            i += n - 1;
            d[i] = x;
            while (i > 0) {
                i = (i - 1) / 2;
                d[i] = gcd(d[i * 2 + 1], d[i * 2 + 2]);
            }
        }

        //[a,b)の最小値,l,rにはノードkに対応付く区間を与える
        static long query(int a, int b, int k, int l, int r) {
            if (r <= a || b <= l) return INF;
            if (a <= l && r <= b) return d[k];
            long vl = query(a, b, k * 2 + 1, l, (l + r) / 2);
            long vr = query(a, b, k * 2 + 2, (l + r) / 2, r);
            return gcd(vl, vr);
        }
        //ex.[a,b)のmin→query(a,b,0,0,ST.n)
    } ST //0-indexed
        //親:(n-1)/2,子:2*n+1,2*n+2
        //i番目のindex→n+i-1
        static long INF = 0; INF 0 static int n = 131072; n 131072 static long[] d = new long[n * 2 - 1]; d new long[n * 2 - 1] n * 2 - 1 n * 2 n 2 1 static void Init() {
            for (int i = 0; i < n * 2 - 1; i++) d[i] = INF;
        } Init {
            for (int i = 0; i < n * 2 - 1; i++) d[i] = INF;
        } for (int i = 0; i < n * 2 - 1; i++) d[i] = INF; int i = 0; int i = 0; i 0 i < n * 2 - 1 i n * 2 - 1 n * 2 n 2 1 i++ i++ i d[i] = INF; d[i] = INF d[i] d i INF //i番目の要素をxに変更（この関数はnが2の累乗でないと機能しない）
        static void update(int i, long x) {
            i += n - 1;
            d[i] = x;
            while (i > 0) {
                i = (i - 1) / 2;
                d[i] = gcd(d[i * 2 + 1], d[i * 2 + 2]);
            }
        } update {
            i += n - 1;
            d[i] = x;
            while (i > 0) {
                i = (i - 1) / 2;
                d[i] = gcd(d[i * 2 + 1], d[i * 2 + 2]);
            }
        } i += n - 1 i n - 1 n 1 d[i] = x d[i] d i x while (i > 0) {
                i = (i - 1) / 2;
                d[i] = gcd(d[i * 2 + 1], d[i * 2 + 2]);
            } i > 0 i 0 {
                i = (i - 1) / 2;
                d[i] = gcd(d[i * 2 + 1], d[i * 2 + 2]);
            } i = (i - 1) / 2 i (i - 1) / 2 (i - 1) i 1 2 d[i] = gcd(d[i * 2 + 1], d[i * 2 + 2]) d[i] d i gcd(d[i * 2 + 1], d[i * 2 + 2]) gcd d[i * 2 + 1] d i * 2 + 1 i * 2 i 2 1 d[i * 2 + 2] d i * 2 + 2 i * 2 i 2 2 int i i long x x //[a,b)の最小値,l,rにはノードkに対応付く区間を与える
        static long query(int a, int b, int k, int l, int r) {
            if (r <= a || b <= l) return INF;
            if (a <= l && r <= b) return d[k];
            long vl = query(a, b, k * 2 + 1, l, (l + r) / 2);
            long vr = query(a, b, k * 2 + 2, (l + r) / 2, r);
            return gcd(vl, vr);
        } query {
            if (r <= a || b <= l) return INF;
            if (a <= l && r <= b) return d[k];
            long vl = query(a, b, k * 2 + 1, l, (l + r) / 2);
            long vr = query(a, b, k * 2 + 2, (l + r) / 2, r);
            return gcd(vl, vr);
        } if (r <= a || b <= l) return INF; r <= a || b <= l r <= a r a b <= l b l return INF; INF if (a <= l && r <= b) return d[k]; a <= l && r <= b a <= l a l r <= b r b return d[k]; d[k] d k long vl = query(a, b, k * 2 + 1, l, (l + r) / 2); vl query(a, b, k * 2 + 1, l, (l + r) / 2) query a b k * 2 + 1 k * 2 k 2 1 l (l + r) / 2 (l + r) l r 2 long vr = query(a, b, k * 2 + 2, (l + r) / 2, r); vr query(a, b, k * 2 + 2, (l + r) / 2, r) query a b k * 2 + 2 k * 2 k 2 2 (l + r) / 2 (l + r) l r 2 r return gcd(vl, vr); gcd(vl, vr) gcd vl vr int a a int b b int k k int l l int r r static class sc {
        static Scanner s = new Scanner(System.in);

        static String next() {
            return s.next();
        }

        static String nextLine() {
            return s.nextLine();
        }

        static int nextInt() {
            return Integer.parseInt(s.next());
        }

        static long nextLong() {
            return Long.parseLong(s.next());
        }

        static double nextDouble() {
            return Double.parseDouble(s.next());
        }

        static boolean hasNext() {
            return s.hasNext();
        }
    } sc static Scanner s = new Scanner(System.in); s new Scanner(System.in) static String next() {
            return s.next();
        } next {
            return s.next();
        } return s.next(); s.next() s.next s static String nextLine() {
            return s.nextLine();
        } nextLine {
            return s.nextLine();
        } return s.nextLine(); s.nextLine() s.nextLine s static int nextInt() {
            return Integer.parseInt(s.next());
        } nextInt {
            return Integer.parseInt(s.next());
        } return Integer.parseInt(s.next()); Integer.parseInt(s.next()) Integer.parseInt Integer s.next() s.next s static long nextLong() {
            return Long.parseLong(s.next());
        } nextLong {
            return Long.parseLong(s.next());
        } return Long.parseLong(s.next()); Long.parseLong(s.next()) Long.parseLong Long s.next() s.next s static double nextDouble() {
            return Double.parseDouble(s.next());
        } nextDouble {
            return Double.parseDouble(s.next());
        } return Double.parseDouble(s.next()); Double.parseDouble(s.next()) Double.parseDouble Double s.next() s.next s static boolean hasNext() {
            return s.hasNext();
        } hasNext {
            return s.hasNext();
        } return s.hasNext(); s.hasNext() s.hasNext s public class Main {
    public static void main(String[] $) {
        int n=sc.nextInt(),k=sc.nextInt();
        double ans=0;
        for (int i = 1; i <= n; i++) {
            int now=i;
            double t=1.0/n;
            while (now<k){
                now*=2;
                t/=2;
            }
            ans+=t;
        }
        out.println(ans);
        out.close();
    }

    static boolean nextPermutation(int[] a) {
        int t = a.length - 1;
        int tt = t + 1;
        for (int i = t; i > 0; --i) {
            if (a[i - 1] < a[i]) {
                int swapIndex = Find(a[i - 1], a, i, t);
                int temp = a[swapIndex];
                a[swapIndex] = a[i - 1];
                a[i - 1] = temp;
                Arrays.sort(a, i, tt);
                return true;
            }
        }
        return false;
    }

    static int Find(int dest, int[] a, int s, int e) {
        if (s == e) {
            return s;
        }
        int m = (s + e + 1) / 2;
        return a[m] <= dest ? Find(dest, a, s, m - 1) : Find(dest, a, m, e);
    }

    static class pair {
        long x, y;

        pair(long a, long b) {
            a = x;
            b = y;
        }
    }

    static class Point3D {
        Point3D(int a, int b, int c) {
            a = x;
            b = y;
            c = z;
        }

        int x, y, z;
    }

    static long mod = 1000000007;

    static long power(long x, long n) {
        if (n == 0) return 1;
        if (n % 2 == 0) {
            long e = power(x, n / 2) % mod;
            return (e * e) % mod;
        }
        return (x * power(x, n - 1)) % mod;
    }

    static long gcd(long a, long b) {
        return b == 0 ? a : gcd(b, a % b);
    }

    static class COM {
        static long[] fact;
        static long[] inv;

        static void Init(int n) {
            fact = new long[n];
            inv = new long[n];
            fact[0] = inv[0] = 1;
            for (int i = 1; i < n; i++) {
                fact[i] = (fact[i - 1] * i) % mod;
                inv[i] = power(fact[i], mod - 2);
            }
        }

        static long C(int n, int k) {
            if (k > n) return 0;
            return ((fact[n] * inv[n - k]) % mod * inv[k]) % mod;
        }
    }

    static class UF {
        static int[] d;

        static void Init(int size) {
            d = new int[size];
            for (int i = 0; i < size; i++) {
                d[i] = -1;
            }
        }

        static boolean unite(int x, int y) {
            x = find(x);
            y = find(y);
            if (x == y) return false;
            if (d[x] > d[y]) {
                int t = d[y];
                d[y] = d[x];
                d[x] = t;
            }
            d[x] += d[y];
            d[y] = x;
            return true;
        }

        static boolean same(int x, int y) {
            return find(x) == find(y);
        }

        static int find(int k) {
            return d[k] < 0 ? k : (d[k] = find(d[k]));
        }

        static int size(int k) {
            return -d[find(k)];
        }
    }

    static class ST {
        //0-indexed
        //親:(n-1)/2,子:2*n+1,2*n+2
        //i番目のindex→n+i-1
        static long INF = 0;
        static int n = 131072;
        static long[] d = new long[n * 2 - 1];

        static void Init() {
            for (int i = 0; i < n * 2 - 1; i++) d[i] = INF;
        }

        //i番目の要素をxに変更（この関数はnが2の累乗でないと機能しない）
        static void update(int i, long x) {
            i += n - 1;
            d[i] = x;
            while (i > 0) {
                i = (i - 1) / 2;
                d[i] = gcd(d[i * 2 + 1], d[i * 2 + 2]);
            }
        }

        //[a,b)の最小値,l,rにはノードkに対応付く区間を与える
        static long query(int a, int b, int k, int l, int r) {
            if (r <= a || b <= l) return INF;
            if (a <= l && r <= b) return d[k];
            long vl = query(a, b, k * 2 + 1, l, (l + r) / 2);
            long vr = query(a, b, k * 2 + 2, (l + r) / 2, r);
            return gcd(vl, vr);
        }
        //ex.[a,b)のmin→query(a,b,0,0,ST.n)
    }

    static void WF(long[][] d, int[] a, int[] b, long[] c) {
        int n = a.length;
        long INF = 100000000000l;
        for (int i = 0; i < n; i++) {
            for (int j = i; j < n; j++) {
                d[i][j] = d[j][i] = INF;
            }
        }
        for (int i = 0; i < n; i++) {
            d[a[i]][b[i]] = d[b[i]][a[i]] = c[i];
        }
        for (int k = 0; k < n; k++) {
            for (int i = 0; i < n; i++) {
                for (int j = 0; j < n; j++) {
                    d[i][j] = d[i][j] > d[i][k] + d[k][j] ? d[i][k] + d[k][j] : d[i][j];
                }
            }
        }
    }

    static PrintWriter out = new PrintWriter(System.out);

    static class sc {
        static Scanner s = new Scanner(System.in);

        static String next() {
            return s.next();
        }

        static String nextLine() {
            return s.nextLine();
        }

        static int nextInt() {
            return Integer.parseInt(s.next());
        }

        static long nextLong() {
            return Long.parseLong(s.next());
        }

        static double nextDouble() {
            return Double.parseDouble(s.next());
        }

        static boolean hasNext() {
            return s.hasNext();
        }
    }

} public class Main {
    public static void main(String[] $) {
        int n=sc.nextInt(),k=sc.nextInt();
        double ans=0;
        for (int i = 1; i <= n; i++) {
            int now=i;
            double t=1.0/n;
            while (now<k){
                now*=2;
                t/=2;
            }
            ans+=t;
        }
        out.println(ans);
        out.close();
    }

    static boolean nextPermutation(int[] a) {
        int t = a.length - 1;
        int tt = t + 1;
        for (int i = t; i > 0; --i) {
            if (a[i - 1] < a[i]) {
                int swapIndex = Find(a[i - 1], a, i, t);
                int temp = a[swapIndex];
                a[swapIndex] = a[i - 1];
                a[i - 1] = temp;
                Arrays.sort(a, i, tt);
                return true;
            }
        }
        return false;
    }

    static int Find(int dest, int[] a, int s, int e) {
        if (s == e) {
            return s;
        }
        int m = (s + e + 1) / 2;
        return a[m] <= dest ? Find(dest, a, s, m - 1) : Find(dest, a, m, e);
    }

    static class pair {
        long x, y;

        pair(long a, long b) {
            a = x;
            b = y;
        }
    }

    static class Point3D {
        Point3D(int a, int b, int c) {
            a = x;
            b = y;
            c = z;
        }

        int x, y, z;
    }

    static long mod = 1000000007;

    static long power(long x, long n) {
        if (n == 0) return 1;
        if (n % 2 == 0) {
            long e = power(x, n / 2) % mod;
            return (e * e) % mod;
        }
        return (x * power(x, n - 1)) % mod;
    }

    static long gcd(long a, long b) {
        return b == 0 ? a : gcd(b, a % b);
    }

    static class COM {
        static long[] fact;
        static long[] inv;

        static void Init(int n) {
            fact = new long[n];
            inv = new long[n];
            fact[0] = inv[0] = 1;
            for (int i = 1; i < n; i++) {
                fact[i] = (fact[i - 1] * i) % mod;
                inv[i] = power(fact[i], mod - 2);
            }
        }

        static long C(int n, int k) {
            if (k > n) return 0;
            return ((fact[n] * inv[n - k]) % mod * inv[k]) % mod;
        }
    }

    static class UF {
        static int[] d;

        static void Init(int size) {
            d = new int[size];
            for (int i = 0; i < size; i++) {
                d[i] = -1;
            }
        }

        static boolean unite(int x, int y) {
            x = find(x);
            y = find(y);
            if (x == y) return false;
            if (d[x] > d[y]) {
                int t = d[y];
                d[y] = d[x];
                d[x] = t;
            }
            d[x] += d[y];
            d[y] = x;
            return true;
        }

        static boolean same(int x, int y) {
            return find(x) == find(y);
        }

        static int find(int k) {
            return d[k] < 0 ? k : (d[k] = find(d[k]));
        }

        static int size(int k) {
            return -d[find(k)];
        }
    }

    static class ST {
        //0-indexed
        //親:(n-1)/2,子:2*n+1,2*n+2
        //i番目のindex→n+i-1
        static long INF = 0;
        static int n = 131072;
        static long[] d = new long[n * 2 - 1];

        static void Init() {
            for (int i = 0; i < n * 2 - 1; i++) d[i] = INF;
        }

        //i番目の要素をxに変更（この関数はnが2の累乗でないと機能しない）
        static void update(int i, long x) {
            i += n - 1;
            d[i] = x;
            while (i > 0) {
                i = (i - 1) / 2;
                d[i] = gcd(d[i * 2 + 1], d[i * 2 + 2]);
            }
        }

        //[a,b)の最小値,l,rにはノードkに対応付く区間を与える
        static long query(int a, int b, int k, int l, int r) {
            if (r <= a || b <= l) return INF;
            if (a <= l && r <= b) return d[k];
            long vl = query(a, b, k * 2 + 1, l, (l + r) / 2);
            long vr = query(a, b, k * 2 + 2, (l + r) / 2, r);
            return gcd(vl, vr);
        }
        //ex.[a,b)のmin→query(a,b,0,0,ST.n)
    }

    static void WF(long[][] d, int[] a, int[] b, long[] c) {
        int n = a.length;
        long INF = 100000000000l;
        for (int i = 0; i < n; i++) {
            for (int j = i; j < n; j++) {
                d[i][j] = d[j][i] = INF;
            }
        }
        for (int i = 0; i < n; i++) {
            d[a[i]][b[i]] = d[b[i]][a[i]] = c[i];
        }
        for (int k = 0; k < n; k++) {
            for (int i = 0; i < n; i++) {
                for (int j = 0; j < n; j++) {
                    d[i][j] = d[i][j] > d[i][k] + d[k][j] ? d[i][k] + d[k][j] : d[i][j];
                }
            }
        }
    }

    static PrintWriter out = new PrintWriter(System.out);

    static class sc {
        static Scanner s = new Scanner(System.in);

        static String next() {
            return s.next();
        }

        static String nextLine() {
            return s.nextLine();
        }

        static int nextInt() {
            return Integer.parseInt(s.next());
        }

        static long nextLong() {
            return Long.parseLong(s.next());
        }

        static double nextDouble() {
            return Double.parseDouble(s.next());
        }

        static boolean hasNext() {
            return s.hasNext();
        }
    }

} Main
/*
String[]の初期化、整数の型がlongになっているか
関数（splitとかcontainsとか）内では"+"とかは正規表現となされるので"\\+"とする
配列のコピーはarr1=arr.clone()
HashSet<>[]はおのおの初期化した？？？？？
負の数の割り算は絶対値が小さいほうに切り捨てられるex.-1/2=0ので、ある値>kみたいな式だとバグらせやすいので注意
ある値>=kとして、切り上げた値をとるべき
toLowerCase()はアルファベット以外に対して行ってもエラーにはならない
ArrayDequeではpopとpushはStackと同じ操作になる
//import static java.lang.System.*; はしばらく使わなそう(使うとしてもexit(0)のためだけ)←return;でよさそう
最後にout.flush()またはout.close()をするのを忘れずに！
Point2D p2d=new Point2D.Double(d1,d2);
//import static java.lang.System.*;
*/
//入力終了→Ctrl+D
import java.lang.reflect.Array;
import java.math.BigDecimal;
import java.net.Inet4Address;
import java.util.*;
import java.io.*;
import java.awt.*;
import java.awt.geom.Point2D;
import static java.lang.Math.*;
public class Main {
    public static void main(String[] $) {
        int n=sc.nextInt(),k=sc.nextInt();
        double ans=0;
        for (int i = 1; i <= n; i++) {
            int now=i;
            double t=1.0/n;
            while (now<k){
                now*=2;
                t/=2;
            }
            ans+=t;
        }
        out.println(ans);
        out.close();
    }

    static boolean nextPermutation(int[] a) {
        int t = a.length - 1;
        int tt = t + 1;
        for (int i = t; i > 0; --i) {
            if (a[i - 1] < a[i]) {
                int swapIndex = Find(a[i - 1], a, i, t);
                int temp = a[swapIndex];
                a[swapIndex] = a[i - 1];
                a[i - 1] = temp;
                Arrays.sort(a, i, tt);
                return true;
            }
        }
        return false;
    }

    static int Find(int dest, int[] a, int s, int e) {
        if (s == e) {
            return s;
        }
        int m = (s + e + 1) / 2;
        return a[m] <= dest ? Find(dest, a, s, m - 1) : Find(dest, a, m, e);
    }

    static class pair {
        long x, y;

        pair(long a, long b) {
            a = x;
            b = y;
        }
    }

    static class Point3D {
        Point3D(int a, int b, int c) {
            a = x;
            b = y;
            c = z;
        }

        int x, y, z;
    }

    static long mod = 1000000007;

    static long power(long x, long n) {
        if (n == 0) return 1;
        if (n % 2 == 0) {
            long e = power(x, n / 2) % mod;
            return (e * e) % mod;
        }
        return (x * power(x, n - 1)) % mod;
    }

    static long gcd(long a, long b) {
        return b == 0 ? a : gcd(b, a % b);
    }

    static class COM {
        static long[] fact;
        static long[] inv;

        static void Init(int n) {
            fact = new long[n];
            inv = new long[n];
            fact[0] = inv[0] = 1;
            for (int i = 1; i < n; i++) {
                fact[i] = (fact[i - 1] * i) % mod;
                inv[i] = power(fact[i], mod - 2);
            }
        }

        static long C(int n, int k) {
            if (k > n) return 0;
            return ((fact[n] * inv[n - k]) % mod * inv[k]) % mod;
        }
    }

    static class UF {
        static int[] d;

        static void Init(int size) {
            d = new int[size];
            for (int i = 0; i < size; i++) {
                d[i] = -1;
            }
        }

        static boolean unite(int x, int y) {
            x = find(x);
            y = find(y);
            if (x == y) return false;
            if (d[x] > d[y]) {
                int t = d[y];
                d[y] = d[x];
                d[x] = t;
            }
            d[x] += d[y];
            d[y] = x;
            return true;
        }

        static boolean same(int x, int y) {
            return find(x) == find(y);
        }

        static int find(int k) {
            return d[k] < 0 ? k : (d[k] = find(d[k]));
        }

        static int size(int k) {
            return -d[find(k)];
        }
    }

    static class ST {
        //0-indexed
        //親:(n-1)/2,子:2*n+1,2*n+2
        //i番目のindex→n+i-1
        static long INF = 0;
        static int n = 131072;
        static long[] d = new long[n * 2 - 1];

        static void Init() {
            for (int i = 0; i < n * 2 - 1; i++) d[i] = INF;
        }

        //i番目の要素をxに変更（この関数はnが2の累乗でないと機能しない）
        static void update(int i, long x) {
            i += n - 1;
            d[i] = x;
            while (i > 0) {
                i = (i - 1) / 2;
                d[i] = gcd(d[i * 2 + 1], d[i * 2 + 2]);
            }
        }

        //[a,b)の最小値,l,rにはノードkに対応付く区間を与える
        static long query(int a, int b, int k, int l, int r) {
            if (r <= a || b <= l) return INF;
            if (a <= l && r <= b) return d[k];
            long vl = query(a, b, k * 2 + 1, l, (l + r) / 2);
            long vr = query(a, b, k * 2 + 2, (l + r) / 2, r);
            return gcd(vl, vr);
        }
        //ex.[a,b)のmin→query(a,b,0,0,ST.n)
    }

    static void WF(long[][] d, int[] a, int[] b, long[] c) {
        int n = a.length;
        long INF = 100000000000l;
        for (int i = 0; i < n; i++) {
            for (int j = i; j < n; j++) {
                d[i][j] = d[j][i] = INF;
            }
        }
        for (int i = 0; i < n; i++) {
            d[a[i]][b[i]] = d[b[i]][a[i]] = c[i];
        }
        for (int k = 0; k < n; k++) {
            for (int i = 0; i < n; i++) {
                for (int j = 0; j < n; j++) {
                    d[i][j] = d[i][j] > d[i][k] + d[k][j] ? d[i][k] + d[k][j] : d[i][j];
                }
            }
        }
    }

    static PrintWriter out = new PrintWriter(System.out);

    static class sc {
        static Scanner s = new Scanner(System.in);

        static String next() {
            return s.next();
        }

        static String nextLine() {
            return s.nextLine();
        }

        static int nextInt() {
            return Integer.parseInt(s.next());
        }

        static long nextLong() {
            return Long.parseLong(s.next());
        }

        static double nextDouble() {
            return Double.parseDouble(s.next());
        }

        static boolean hasNext() {
            return s.hasNext();
        }
    }

}