import java.util.*;
class Main {
  public static void main(String[] args) {
    Scanner stdIn = new Scanner(System.in);
    int n = stdIn.nextInt();
    int k = stdIn.nextInt();
    double per = 0;
    int[] a = new int[n];
    double[] b = new double[n];
    for(int i = 0;i<a.length;i++) {
      a[i] = i+1;
    }
    for(int i = 0;i<a.length;i++) {
      int count = a[i];
      b[i] = 1.0/n;
      for(;count<k;count*=2) {
        b[i] = b[i]*1/2;
      }
    }
    double sum = 0;
    for(int i = 0;i<b.length;i++) {
      sum += b[i];
    }
    System.out.println(sum);
  }
} import java.util.*; util.* java class Main {
  public static void main(String[] args) {
    Scanner stdIn = new Scanner(System.in);
    int n = stdIn.nextInt();
    int k = stdIn.nextInt();
    double per = 0;
    int[] a = new int[n];
    double[] b = new double[n];
    for(int i = 0;i<a.length;i++) {
      a[i] = i+1;
    }
    for(int i = 0;i<a.length;i++) {
      int count = a[i];
      b[i] = 1.0/n;
      for(;count<k;count*=2) {
        b[i] = b[i]*1/2;
      }
    }
    double sum = 0;
    for(int i = 0;i<b.length;i++) {
      sum += b[i];
    }
    System.out.println(sum);
  }
} Main public static void main(String[] args) {
    Scanner stdIn = new Scanner(System.in);
    int n = stdIn.nextInt();
    int k = stdIn.nextInt();
    double per = 0;
    int[] a = new int[n];
    double[] b = new double[n];
    for(int i = 0;i<a.length;i++) {
      a[i] = i+1;
    }
    for(int i = 0;i<a.length;i++) {
      int count = a[i];
      b[i] = 1.0/n;
      for(;count<k;count*=2) {
        b[i] = b[i]*1/2;
      }
    }
    double sum = 0;
    for(int i = 0;i<b.length;i++) {
      sum += b[i];
    }
    System.out.println(sum);
  } main {
    Scanner stdIn = new Scanner(System.in);
    int n = stdIn.nextInt();
    int k = stdIn.nextInt();
    double per = 0;
    int[] a = new int[n];
    double[] b = new double[n];
    for(int i = 0;i<a.length;i++) {
      a[i] = i+1;
    }
    for(int i = 0;i<a.length;i++) {
      int count = a[i];
      b[i] = 1.0/n;
      for(;count<k;count*=2) {
        b[i] = b[i]*1/2;
      }
    }
    double sum = 0;
    for(int i = 0;i<b.length;i++) {
      sum += b[i];
    }
    System.out.println(sum);
  } Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) int n = stdIn.nextInt(); n stdIn.nextInt() stdIn.nextInt stdIn int k = stdIn.nextInt(); k stdIn.nextInt() stdIn.nextInt stdIn double per = 0; per 0 int[] a = new int[n]; a new int[n] n double[] b = new double[n]; b new double[n] n for(int i = 0;i<a.length;i++) {
      a[i] = i+1;
    } int i = 0; int i = 0; i 0 i<a.length i a.length a a.length i++ i++ i {
      a[i] = i+1;
    } {
      a[i] = i+1;
    } a[i] = i+1 a[i] a i i+1 i 1 for(int i = 0;i<a.length;i++) {
      int count = a[i];
      b[i] = 1.0/n;
      for(;count<k;count*=2) {
        b[i] = b[i]*1/2;
      }
    } int i = 0; int i = 0; i 0 i<a.length i a.length a a.length i++ i++ i {
      int count = a[i];
      b[i] = 1.0/n;
      for(;count<k;count*=2) {
        b[i] = b[i]*1/2;
      }
    } {
      int count = a[i];
      b[i] = 1.0/n;
      for(;count<k;count*=2) {
        b[i] = b[i]*1/2;
      }
    } int count = a[i]; count a[i] a i b[i] = 1.0/n b[i] b i 1.0/n 1.0 n for(;count<k;count*=2) {
        b[i] = b[i]*1/2;
      } ; count<k count k count*=2 count*=2 count 2 {
        b[i] = b[i]*1/2;
      } {
        b[i] = b[i]*1/2;
      } b[i] = b[i]*1/2 b[i] b i b[i]*1/2 b[i]*1 b[i] b i 1 2 double sum = 0; sum 0 for(int i = 0;i<b.length;i++) {
      sum += b[i];
    } int i = 0; int i = 0; i 0 i<b.length i b.length b b.length i++ i++ i {
      sum += b[i];
    } {
      sum += b[i];
    } sum += b[i] sum b[i] b i System.out.println(sum) System.out.println System.out System System.out sum String[] args args
import java.util.*;
class Main {
  public static void main(String[] args) {
    Scanner stdIn = new Scanner(System.in);
    int n = stdIn.nextInt();
    int k = stdIn.nextInt();
    double per = 0;
    int[] a = new int[n];
    double[] b = new double[n];
    for(int i = 0;i<a.length;i++) {
      a[i] = i+1;
    }
    for(int i = 0;i<a.length;i++) {
      int count = a[i];
      b[i] = 1.0/n;
      for(;count<k;count*=2) {
        b[i] = b[i]*1/2;
      }
    }
    double sum = 0;
    for(int i = 0;i<b.length;i++) {
      sum += b[i];
    }
    System.out.println(sum);
  }
}
