import java.util.Scanner;

public class Main {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int k = sc.nextInt();

    double p = 0;

    for (int i = 1; i <= n; ++i)
      p += (1 / (double) n) * Math.pow(0.5, Math.max(0, Math.ceil(log((double) k / i))));
    
    System.out.println(p);
  }

  public static double log(double x) {
    return Math.log(x) / Math.log(2);
  }
} import java.util.Scanner; Scanner java.util public class Main {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int k = sc.nextInt();

    double p = 0;

    for (int i = 1; i <= n; ++i)
      p += (1 / (double) n) * Math.pow(0.5, Math.max(0, Math.ceil(log((double) k / i))));
    
    System.out.println(p);
  }

  public static double log(double x) {
    return Math.log(x) / Math.log(2);
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int k = sc.nextInt();

    double p = 0;

    for (int i = 1; i <= n; ++i)
      p += (1 / (double) n) * Math.pow(0.5, Math.max(0, Math.ceil(log((double) k / i))));
    
    System.out.println(p);
  } main {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int k = sc.nextInt();

    double p = 0;

    for (int i = 1; i <= n; ++i)
      p += (1 / (double) n) * Math.pow(0.5, Math.max(0, Math.ceil(log((double) k / i))));
    
    System.out.println(p);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int k = sc.nextInt(); k sc.nextInt() sc.nextInt sc double p = 0; p 0 for (int i = 1; i <= n; ++i)
      p += (1 / (double) n) * Math.pow(0.5, Math.max(0, Math.ceil(log((double) k / i)))); int i = 1; int i = 1; i 1 i <= n i n ++i ++i i p += (1 / (double) n) * Math.pow(0.5, Math.max(0, Math.ceil(log((double) k / i)))); p += (1 / (double) n) * Math.pow(0.5, Math.max(0, Math.ceil(log((double) k / i)))) p (1 / (double) n) * Math.pow(0.5, Math.max(0, Math.ceil(log((double) k / i)))) (1 / (double) n) 1 (double) n Math.pow(0.5, Math.max(0, Math.ceil(log((double) k / i)))) Math.pow Math 0.5 Math.max(0, Math.ceil(log((double) k / i))) Math.max Math 0 Math.ceil(log((double) k / i)) Math.ceil Math log((double) k / i) log (double) k / i (double) k i System.out.println(p) System.out.println System.out System System.out p String[] args args public static double log(double x) {
    return Math.log(x) / Math.log(2);
  } log {
    return Math.log(x) / Math.log(2);
  } return Math.log(x) / Math.log(2); Math.log(x) / Math.log(2) Math.log(x) Math.log Math x Math.log(2) Math.log Math 2 double x x public class Main {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int k = sc.nextInt();

    double p = 0;

    for (int i = 1; i <= n; ++i)
      p += (1 / (double) n) * Math.pow(0.5, Math.max(0, Math.ceil(log((double) k / i))));
    
    System.out.println(p);
  }

  public static double log(double x) {
    return Math.log(x) / Math.log(2);
  }
} public class Main {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int k = sc.nextInt();

    double p = 0;

    for (int i = 1; i <= n; ++i)
      p += (1 / (double) n) * Math.pow(0.5, Math.max(0, Math.ceil(log((double) k / i))));
    
    System.out.println(p);
  }

  public static double log(double x) {
    return Math.log(x) / Math.log(2);
  }
} Main
import java.util.Scanner;

public class Main {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int k = sc.nextInt();

    double p = 0;

    for (int i = 1; i <= n; ++i)
      p += (1 / (double) n) * Math.pow(0.5, Math.max(0, Math.ceil(log((double) k / i))));
    
    System.out.println(p);
  }

  public static double log(double x) {
    return Math.log(x) / Math.log(2);
  }
}