
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

public class Main {
    public static void main(String [] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int k = scanner.nextInt();
        double sum = 0;
        long [] pow = new long[21];
        pow[0] = 1;
        for (int i = 1; i <= 20; ++i) {
            pow[i] = pow[i - 1] * 2;
          //  System.out.println("pow: " + pow[i]);
        }
        List<Long> pows = new ArrayList<>();
        for (int i = 0 ;i <= 20; ++i) {
            pows.add(pow[i]);
        }
        for (int i = 1; i <= n; ++i) {
            long target = k / i;
         //   System.out.println("target: " + target);
            int find = Collections.binarySearch(
                    pows,
                    target);
            int times;
            if (find >= 0 && find <= 20) {
                if (pows.get(find) == target) {
                    times = find;
                } else {
                    times = -1 * (find + 1);
                }
            } else {
                times = -1 * (find + 1);
            }
            if (Math.pow(2, times) * i < k) {
                times++;
            }

        //    System.out.println("i: " + i + " times: " + times + " add: " + Math.pow(2, times));
            sum += Math.pow(0.5, times);
       //     System.out.println("sum: " + sum);
        }
        sum /= n;
        System.out.println(sum);
    }

    public static int log(int x, int base)
    {
        return (int) (Math.log(x) / Math.log(base));
    }
} import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String [] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int k = scanner.nextInt();
        double sum = 0;
        long [] pow = new long[21];
        pow[0] = 1;
        for (int i = 1; i <= 20; ++i) {
            pow[i] = pow[i - 1] * 2;
          //  System.out.println("pow: " + pow[i]);
        }
        List<Long> pows = new ArrayList<>();
        for (int i = 0 ;i <= 20; ++i) {
            pows.add(pow[i]);
        }
        for (int i = 1; i <= n; ++i) {
            long target = k / i;
         //   System.out.println("target: " + target);
            int find = Collections.binarySearch(
                    pows,
                    target);
            int times;
            if (find >= 0 && find <= 20) {
                if (pows.get(find) == target) {
                    times = find;
                } else {
                    times = -1 * (find + 1);
                }
            } else {
                times = -1 * (find + 1);
            }
            if (Math.pow(2, times) * i < k) {
                times++;
            }

        //    System.out.println("i: " + i + " times: " + times + " add: " + Math.pow(2, times));
            sum += Math.pow(0.5, times);
       //     System.out.println("sum: " + sum);
        }
        sum /= n;
        System.out.println(sum);
    }

    public static int log(int x, int base)
    {
        return (int) (Math.log(x) / Math.log(base));
    }
} Main public static void main(String [] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int k = scanner.nextInt();
        double sum = 0;
        long [] pow = new long[21];
        pow[0] = 1;
        for (int i = 1; i <= 20; ++i) {
            pow[i] = pow[i - 1] * 2;
          //  System.out.println("pow: " + pow[i]);
        }
        List<Long> pows = new ArrayList<>();
        for (int i = 0 ;i <= 20; ++i) {
            pows.add(pow[i]);
        }
        for (int i = 1; i <= n; ++i) {
            long target = k / i;
         //   System.out.println("target: " + target);
            int find = Collections.binarySearch(
                    pows,
                    target);
            int times;
            if (find >= 0 && find <= 20) {
                if (pows.get(find) == target) {
                    times = find;
                } else {
                    times = -1 * (find + 1);
                }
            } else {
                times = -1 * (find + 1);
            }
            if (Math.pow(2, times) * i < k) {
                times++;
            }

        //    System.out.println("i: " + i + " times: " + times + " add: " + Math.pow(2, times));
            sum += Math.pow(0.5, times);
       //     System.out.println("sum: " + sum);
        }
        sum /= n;
        System.out.println(sum);
    } main {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int k = scanner.nextInt();
        double sum = 0;
        long [] pow = new long[21];
        pow[0] = 1;
        for (int i = 1; i <= 20; ++i) {
            pow[i] = pow[i - 1] * 2;
          //  System.out.println("pow: " + pow[i]);
        }
        List<Long> pows = new ArrayList<>();
        for (int i = 0 ;i <= 20; ++i) {
            pows.add(pow[i]);
        }
        for (int i = 1; i <= n; ++i) {
            long target = k / i;
         //   System.out.println("target: " + target);
            int find = Collections.binarySearch(
                    pows,
                    target);
            int times;
            if (find >= 0 && find <= 20) {
                if (pows.get(find) == target) {
                    times = find;
                } else {
                    times = -1 * (find + 1);
                }
            } else {
                times = -1 * (find + 1);
            }
            if (Math.pow(2, times) * i < k) {
                times++;
            }

        //    System.out.println("i: " + i + " times: " + times + " add: " + Math.pow(2, times));
            sum += Math.pow(0.5, times);
       //     System.out.println("sum: " + sum);
        }
        sum /= n;
        System.out.println(sum);
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int n = scanner.nextInt(); n scanner.nextInt() scanner.nextInt scanner int k = scanner.nextInt(); k scanner.nextInt() scanner.nextInt scanner double sum = 0; sum 0 long [] pow = new long[21]; pow new long[21] 21 pow[0] = 1 pow[0] pow 0 1 for (int i = 1; i <= 20; ++i) {
            pow[i] = pow[i - 1] * 2;
          //  System.out.println("pow: " + pow[i]);
        } int i = 1; int i = 1; i 1 i <= 20 i 20 ++i ++i i {
            pow[i] = pow[i - 1] * 2;
          //  System.out.println("pow: " + pow[i]);
        } {
            pow[i] = pow[i - 1] * 2;
          //  System.out.println("pow: " + pow[i]);
        } pow[i] = pow[i - 1] * 2 pow[i] pow i pow[i - 1] * 2 pow[i - 1] pow i - 1 i 1 2 List<Long> pows = new ArrayList<>(); pows new ArrayList<>() for (int i = 0 ;i <= 20; ++i) {
            pows.add(pow[i]);
        } int i = 0 ; int i = 0 ; i 0 i <= 20 i 20 ++i ++i i {
            pows.add(pow[i]);
        } {
            pows.add(pow[i]);
        } pows.add(pow[i]) pows.add pows pow[i] pow i for (int i = 1; i <= n; ++i) {
            long target = k / i;
         //   System.out.println("target: " + target);
            int find = Collections.binarySearch(
                    pows,
                    target);
            int times;
            if (find >= 0 && find <= 20) {
                if (pows.get(find) == target) {
                    times = find;
                } else {
                    times = -1 * (find + 1);
                }
            } else {
                times = -1 * (find + 1);
            }
            if (Math.pow(2, times) * i < k) {
                times++;
            }

        //    System.out.println("i: " + i + " times: " + times + " add: " + Math.pow(2, times));
            sum += Math.pow(0.5, times);
       //     System.out.println("sum: " + sum);
        } int i = 1; int i = 1; i 1 i <= n i n ++i ++i i {
            long target = k / i;
         //   System.out.println("target: " + target);
            int find = Collections.binarySearch(
                    pows,
                    target);
            int times;
            if (find >= 0 && find <= 20) {
                if (pows.get(find) == target) {
                    times = find;
                } else {
                    times = -1 * (find + 1);
                }
            } else {
                times = -1 * (find + 1);
            }
            if (Math.pow(2, times) * i < k) {
                times++;
            }

        //    System.out.println("i: " + i + " times: " + times + " add: " + Math.pow(2, times));
            sum += Math.pow(0.5, times);
       //     System.out.println("sum: " + sum);
        } {
            long target = k / i;
         //   System.out.println("target: " + target);
            int find = Collections.binarySearch(
                    pows,
                    target);
            int times;
            if (find >= 0 && find <= 20) {
                if (pows.get(find) == target) {
                    times = find;
                } else {
                    times = -1 * (find + 1);
                }
            } else {
                times = -1 * (find + 1);
            }
            if (Math.pow(2, times) * i < k) {
                times++;
            }

        //    System.out.println("i: " + i + " times: " + times + " add: " + Math.pow(2, times));
            sum += Math.pow(0.5, times);
       //     System.out.println("sum: " + sum);
        } long target = k / i; target k / i k i int find = Collections.binarySearch(
                    pows,
                    target); find Collections.binarySearch(
                    pows,
                    target) Collections.binarySearch Collections pows target int times; times if (find >= 0 && find <= 20) {
                if (pows.get(find) == target) {
                    times = find;
                } else {
                    times = -1 * (find + 1);
                }
            } else {
                times = -1 * (find + 1);
            } find >= 0 && find <= 20 find >= 0 find 0 find <= 20 find 20 {
                if (pows.get(find) == target) {
                    times = find;
                } else {
                    times = -1 * (find + 1);
                }
            } if (pows.get(find) == target) {
                    times = find;
                } else {
                    times = -1 * (find + 1);
                } pows.get(find) == target pows.get(find) pows.get pows find target {
                    times = find;
                } times = find times find {
                    times = -1 * (find + 1);
                } times = -1 * (find + 1) times -1 * (find + 1) -1 1 (find + 1) find 1 {
                times = -1 * (find + 1);
            } times = -1 * (find + 1) times -1 * (find + 1) -1 1 (find + 1) find 1 if (Math.pow(2, times) * i < k) {
                times++;
            } Math.pow(2, times) * i < k Math.pow(2, times) * i Math.pow(2, times) Math.pow Math 2 times i k {
                times++;
            } times++ times sum += Math.pow(0.5, times) sum Math.pow(0.5, times) Math.pow Math 0.5 times sum /= n sum n System.out.println(sum) System.out.println System.out System System.out sum String [] args args public static int log(int x, int base)
    {
        return (int) (Math.log(x) / Math.log(base));
    } log {
        return (int) (Math.log(x) / Math.log(base));
    } return (int) (Math.log(x) / Math.log(base)); (int) (Math.log(x) / Math.log(base)) Math.log(x) Math.log Math x Math.log(base) Math.log Math base int x x int base base public class Main {
    public static void main(String [] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int k = scanner.nextInt();
        double sum = 0;
        long [] pow = new long[21];
        pow[0] = 1;
        for (int i = 1; i <= 20; ++i) {
            pow[i] = pow[i - 1] * 2;
          //  System.out.println("pow: " + pow[i]);
        }
        List<Long> pows = new ArrayList<>();
        for (int i = 0 ;i <= 20; ++i) {
            pows.add(pow[i]);
        }
        for (int i = 1; i <= n; ++i) {
            long target = k / i;
         //   System.out.println("target: " + target);
            int find = Collections.binarySearch(
                    pows,
                    target);
            int times;
            if (find >= 0 && find <= 20) {
                if (pows.get(find) == target) {
                    times = find;
                } else {
                    times = -1 * (find + 1);
                }
            } else {
                times = -1 * (find + 1);
            }
            if (Math.pow(2, times) * i < k) {
                times++;
            }

        //    System.out.println("i: " + i + " times: " + times + " add: " + Math.pow(2, times));
            sum += Math.pow(0.5, times);
       //     System.out.println("sum: " + sum);
        }
        sum /= n;
        System.out.println(sum);
    }

    public static int log(int x, int base)
    {
        return (int) (Math.log(x) / Math.log(base));
    }
} public class Main {
    public static void main(String [] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int k = scanner.nextInt();
        double sum = 0;
        long [] pow = new long[21];
        pow[0] = 1;
        for (int i = 1; i <= 20; ++i) {
            pow[i] = pow[i - 1] * 2;
          //  System.out.println("pow: " + pow[i]);
        }
        List<Long> pows = new ArrayList<>();
        for (int i = 0 ;i <= 20; ++i) {
            pows.add(pow[i]);
        }
        for (int i = 1; i <= n; ++i) {
            long target = k / i;
         //   System.out.println("target: " + target);
            int find = Collections.binarySearch(
                    pows,
                    target);
            int times;
            if (find >= 0 && find <= 20) {
                if (pows.get(find) == target) {
                    times = find;
                } else {
                    times = -1 * (find + 1);
                }
            } else {
                times = -1 * (find + 1);
            }
            if (Math.pow(2, times) * i < k) {
                times++;
            }

        //    System.out.println("i: " + i + " times: " + times + " add: " + Math.pow(2, times));
            sum += Math.pow(0.5, times);
       //     System.out.println("sum: " + sum);
        }
        sum /= n;
        System.out.println(sum);
    }

    public static int log(int x, int base)
    {
        return (int) (Math.log(x) / Math.log(base));
    }
} Main

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

public class Main {
    public static void main(String [] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int k = scanner.nextInt();
        double sum = 0;
        long [] pow = new long[21];
        pow[0] = 1;
        for (int i = 1; i <= 20; ++i) {
            pow[i] = pow[i - 1] * 2;
          //  System.out.println("pow: " + pow[i]);
        }
        List<Long> pows = new ArrayList<>();
        for (int i = 0 ;i <= 20; ++i) {
            pows.add(pow[i]);
        }
        for (int i = 1; i <= n; ++i) {
            long target = k / i;
         //   System.out.println("target: " + target);
            int find = Collections.binarySearch(
                    pows,
                    target);
            int times;
            if (find >= 0 && find <= 20) {
                if (pows.get(find) == target) {
                    times = find;
                } else {
                    times = -1 * (find + 1);
                }
            } else {
                times = -1 * (find + 1);
            }
            if (Math.pow(2, times) * i < k) {
                times++;
            }

        //    System.out.println("i: " + i + " times: " + times + " add: " + Math.pow(2, times));
            sum += Math.pow(0.5, times);
       //     System.out.println("sum: " + sum);
        }
        sum /= n;
        System.out.println(sum);
    }

    public static int log(int x, int base)
    {
        return (int) (Math.log(x) / Math.log(base));
    }
}
