import java.util.*;
public class Main {

  public static void main (String[] args) {

    Scanner sc = new Scanner(System.in);
    
    int N = sc.nextInt();
    double K = sc.nextDouble();

    sc.close();

    double answer = 0.0;

    for (int i = 1; i <= N; i++) {

      double count = i;
      double j = 0;

      while (count < K) {
        count = count * 2;
        j++;
      }

      answer += Math.pow(0.5,j) / N;

    }

    System.out.println(answer);
 
  }

} import java.util.*; util.* java public class Main {

  public static void main (String[] args) {

    Scanner sc = new Scanner(System.in);
    
    int N = sc.nextInt();
    double K = sc.nextDouble();

    sc.close();

    double answer = 0.0;

    for (int i = 1; i <= N; i++) {

      double count = i;
      double j = 0;

      while (count < K) {
        count = count * 2;
        j++;
      }

      answer += Math.pow(0.5,j) / N;

    }

    System.out.println(answer);
 
  }

} Main public static void main (String[] args) {

    Scanner sc = new Scanner(System.in);
    
    int N = sc.nextInt();
    double K = sc.nextDouble();

    sc.close();

    double answer = 0.0;

    for (int i = 1; i <= N; i++) {

      double count = i;
      double j = 0;

      while (count < K) {
        count = count * 2;
        j++;
      }

      answer += Math.pow(0.5,j) / N;

    }

    System.out.println(answer);
 
  } main {

    Scanner sc = new Scanner(System.in);
    
    int N = sc.nextInt();
    double K = sc.nextDouble();

    sc.close();

    double answer = 0.0;

    for (int i = 1; i <= N; i++) {

      double count = i;
      double j = 0;

      while (count < K) {
        count = count * 2;
        j++;
      }

      answer += Math.pow(0.5,j) / N;

    }

    System.out.println(answer);
 
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc double K = sc.nextDouble(); K sc.nextDouble() sc.nextDouble sc sc.close() sc.close sc double answer = 0.0; answer 0.0 for (int i = 1; i <= N; i++) {

      double count = i;
      double j = 0;

      while (count < K) {
        count = count * 2;
        j++;
      }

      answer += Math.pow(0.5,j) / N;

    } int i = 1; int i = 1; i 1 i <= N i N i++ i++ i {

      double count = i;
      double j = 0;

      while (count < K) {
        count = count * 2;
        j++;
      }

      answer += Math.pow(0.5,j) / N;

    } {

      double count = i;
      double j = 0;

      while (count < K) {
        count = count * 2;
        j++;
      }

      answer += Math.pow(0.5,j) / N;

    } double count = i; count i double j = 0; j 0 while (count < K) {
        count = count * 2;
        j++;
      } count < K count K {
        count = count * 2;
        j++;
      } count = count * 2 count count * 2 count 2 j++ j answer += Math.pow(0.5,j) / N answer Math.pow(0.5,j) / N Math.pow(0.5,j) Math.pow Math 0.5 j N System.out.println(answer) System.out.println System.out System System.out answer String[] args args public class Main {

  public static void main (String[] args) {

    Scanner sc = new Scanner(System.in);
    
    int N = sc.nextInt();
    double K = sc.nextDouble();

    sc.close();

    double answer = 0.0;

    for (int i = 1; i <= N; i++) {

      double count = i;
      double j = 0;

      while (count < K) {
        count = count * 2;
        j++;
      }

      answer += Math.pow(0.5,j) / N;

    }

    System.out.println(answer);
 
  }

} public class Main {

  public static void main (String[] args) {

    Scanner sc = new Scanner(System.in);
    
    int N = sc.nextInt();
    double K = sc.nextDouble();

    sc.close();

    double answer = 0.0;

    for (int i = 1; i <= N; i++) {

      double count = i;
      double j = 0;

      while (count < K) {
        count = count * 2;
        j++;
      }

      answer += Math.pow(0.5,j) / N;

    }

    System.out.println(answer);
 
  }

} Main
import java.util.*;
public class Main {

  public static void main (String[] args) {

    Scanner sc = new Scanner(System.in);
    
    int N = sc.nextInt();
    double K = sc.nextDouble();

    sc.close();

    double answer = 0.0;

    for (int i = 1; i <= N; i++) {

      double count = i;
      double j = 0;

      while (count < K) {
        count = count * 2;
        j++;
      }

      answer += Math.pow(0.5,j) / N;

    }

    System.out.println(answer);
 
  }

}