import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    long n = sc.nextLong();
    long k = sc.nextLong();
    int[] t = new int[(int)n];
    int m = 0;
    for(long i = 0; i < n; i++) {
      int p = 0;
      long s = i + 1;
      for(int j = 0; j < 30; j++) {
        if(s >= k) break;
        s *= 2;
        p++;
      }
      t[(int)i] = p;
      m = Math.max(m, p);
    }
    long q1 = n * (long)Math.pow(2, m);
    long q2 = 0;
    for(int i = 0; i < n; i++) {
      q2 += ((long)Math.pow(2, m - t[i]));
    }
    double ans = (double)q2 / (double)q1;
    System.out.println(ans);
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    long n = sc.nextLong();
    long k = sc.nextLong();
    int[] t = new int[(int)n];
    int m = 0;
    for(long i = 0; i < n; i++) {
      int p = 0;
      long s = i + 1;
      for(int j = 0; j < 30; j++) {
        if(s >= k) break;
        s *= 2;
        p++;
      }
      t[(int)i] = p;
      m = Math.max(m, p);
    }
    long q1 = n * (long)Math.pow(2, m);
    long q2 = 0;
    for(int i = 0; i < n; i++) {
      q2 += ((long)Math.pow(2, m - t[i]));
    }
    double ans = (double)q2 / (double)q1;
    System.out.println(ans);
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    long n = sc.nextLong();
    long k = sc.nextLong();
    int[] t = new int[(int)n];
    int m = 0;
    for(long i = 0; i < n; i++) {
      int p = 0;
      long s = i + 1;
      for(int j = 0; j < 30; j++) {
        if(s >= k) break;
        s *= 2;
        p++;
      }
      t[(int)i] = p;
      m = Math.max(m, p);
    }
    long q1 = n * (long)Math.pow(2, m);
    long q2 = 0;
    for(int i = 0; i < n; i++) {
      q2 += ((long)Math.pow(2, m - t[i]));
    }
    double ans = (double)q2 / (double)q1;
    System.out.println(ans);
  } main {
    Scanner sc = new Scanner(System.in);
    long n = sc.nextLong();
    long k = sc.nextLong();
    int[] t = new int[(int)n];
    int m = 0;
    for(long i = 0; i < n; i++) {
      int p = 0;
      long s = i + 1;
      for(int j = 0; j < 30; j++) {
        if(s >= k) break;
        s *= 2;
        p++;
      }
      t[(int)i] = p;
      m = Math.max(m, p);
    }
    long q1 = n * (long)Math.pow(2, m);
    long q2 = 0;
    for(int i = 0; i < n; i++) {
      q2 += ((long)Math.pow(2, m - t[i]));
    }
    double ans = (double)q2 / (double)q1;
    System.out.println(ans);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long n = sc.nextLong(); n sc.nextLong() sc.nextLong sc long k = sc.nextLong(); k sc.nextLong() sc.nextLong sc int[] t = new int[(int)n]; t new int[(int)n] (int)n int m = 0; m 0 for(long i = 0; i < n; i++) {
      int p = 0;
      long s = i + 1;
      for(int j = 0; j < 30; j++) {
        if(s >= k) break;
        s *= 2;
        p++;
      }
      t[(int)i] = p;
      m = Math.max(m, p);
    } long i = 0; long i = 0; i 0 i < n i n i++ i++ i {
      int p = 0;
      long s = i + 1;
      for(int j = 0; j < 30; j++) {
        if(s >= k) break;
        s *= 2;
        p++;
      }
      t[(int)i] = p;
      m = Math.max(m, p);
    } {
      int p = 0;
      long s = i + 1;
      for(int j = 0; j < 30; j++) {
        if(s >= k) break;
        s *= 2;
        p++;
      }
      t[(int)i] = p;
      m = Math.max(m, p);
    } int p = 0; p 0 long s = i + 1; s i + 1 i 1 for(int j = 0; j < 30; j++) {
        if(s >= k) break;
        s *= 2;
        p++;
      } int j = 0; int j = 0; j 0 j < 30 j 30 j++ j++ j {
        if(s >= k) break;
        s *= 2;
        p++;
      } {
        if(s >= k) break;
        s *= 2;
        p++;
      } if(s >= k) break; s >= k s k break; s *= 2 s 2 p++ p t[(int)i] = p t[(int)i] t (int)i p m = Math.max(m, p) m Math.max(m, p) Math.max Math m p long q1 = n * (long)Math.pow(2, m); q1 n * (long)Math.pow(2, m) n (long)Math.pow(2, m) Math.pow Math 2 m long q2 = 0; q2 0 for(int i = 0; i < n; i++) {
      q2 += ((long)Math.pow(2, m - t[i]));
    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
      q2 += ((long)Math.pow(2, m - t[i]));
    } {
      q2 += ((long)Math.pow(2, m - t[i]));
    } q2 += ((long)Math.pow(2, m - t[i])) q2 ((long)Math.pow(2, m - t[i])) Math.pow Math 2 m - t[i] m t[i] t i double ans = (double)q2 / (double)q1; ans (double)q2 / (double)q1 (double)q2 (double)q1 System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    long n = sc.nextLong();
    long k = sc.nextLong();
    int[] t = new int[(int)n];
    int m = 0;
    for(long i = 0; i < n; i++) {
      int p = 0;
      long s = i + 1;
      for(int j = 0; j < 30; j++) {
        if(s >= k) break;
        s *= 2;
        p++;
      }
      t[(int)i] = p;
      m = Math.max(m, p);
    }
    long q1 = n * (long)Math.pow(2, m);
    long q2 = 0;
    for(int i = 0; i < n; i++) {
      q2 += ((long)Math.pow(2, m - t[i]));
    }
    double ans = (double)q2 / (double)q1;
    System.out.println(ans);
  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    long n = sc.nextLong();
    long k = sc.nextLong();
    int[] t = new int[(int)n];
    int m = 0;
    for(long i = 0; i < n; i++) {
      int p = 0;
      long s = i + 1;
      for(int j = 0; j < 30; j++) {
        if(s >= k) break;
        s *= 2;
        p++;
      }
      t[(int)i] = p;
      m = Math.max(m, p);
    }
    long q1 = n * (long)Math.pow(2, m);
    long q2 = 0;
    for(int i = 0; i < n; i++) {
      q2 += ((long)Math.pow(2, m - t[i]));
    }
    double ans = (double)q2 / (double)q1;
    System.out.println(ans);
  }
} Main
import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    long n = sc.nextLong();
    long k = sc.nextLong();
    int[] t = new int[(int)n];
    int m = 0;
    for(long i = 0; i < n; i++) {
      int p = 0;
      long s = i + 1;
      for(int j = 0; j < 30; j++) {
        if(s >= k) break;
        s *= 2;
        p++;
      }
      t[(int)i] = p;
      m = Math.max(m, p);
    }
    long q1 = n * (long)Math.pow(2, m);
    long q2 = 0;
    for(int i = 0; i < n; i++) {
      q2 += ((long)Math.pow(2, m - t[i]));
    }
    double ans = (double)q2 / (double)q1;
    System.out.println(ans);
  }
}