import 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, phold = 1.0;
     int point;
     for (int i =1;i<=N;i++){
       point = i;
       phold = 1.0/N;
       while(point<K){
         point *= 2;
         phold = phold/2.0;
       }
       p += phold;
     }
     System.out.println(p);
   }
} import java.util.*; util.* java 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, phold = 1.0;
     int point;
     for (int i =1;i<=N;i++){
       point = i;
       phold = 1.0/N;
       while(point<K){
         point *= 2;
         phold = phold/2.0;
       }
       p += phold;
     }
     System.out.println(p);
   }
} Main public static void main(String[] args) {
     Scanner sc = new Scanner(System.in);
     int N = sc.nextInt();
     int K = sc.nextInt();
     double p = 0, phold = 1.0;
     int point;
     for (int i =1;i<=N;i++){
       point = i;
       phold = 1.0/N;
       while(point<K){
         point *= 2;
         phold = phold/2.0;
       }
       p += phold;
     }
     System.out.println(p);
   } main {
     Scanner sc = new Scanner(System.in);
     int N = sc.nextInt();
     int K = sc.nextInt();
     double p = 0, phold = 1.0;
     int point;
     for (int i =1;i<=N;i++){
       point = i;
       phold = 1.0/N;
       while(point<K){
         point *= 2;
         phold = phold/2.0;
       }
       p += phold;
     }
     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 phold = 1.0; phold 1.0 int point; point for (int i =1;i<=N;i++){
       point = i;
       phold = 1.0/N;
       while(point<K){
         point *= 2;
         phold = phold/2.0;
       }
       p += phold;
     } int i =1; int i =1; i 1 i<=N i N i++ i++ i {
       point = i;
       phold = 1.0/N;
       while(point<K){
         point *= 2;
         phold = phold/2.0;
       }
       p += phold;
     } {
       point = i;
       phold = 1.0/N;
       while(point<K){
         point *= 2;
         phold = phold/2.0;
       }
       p += phold;
     } point = i point i phold = 1.0/N phold 1.0/N 1.0 N while(point<K){
         point *= 2;
         phold = phold/2.0;
       } point<K point K {
         point *= 2;
         phold = phold/2.0;
       } point *= 2 point 2 phold = phold/2.0 phold phold/2.0 phold 2.0 p += phold p phold System.out.println(p) System.out.println System.out System System.out p String[] args args 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, phold = 1.0;
     int point;
     for (int i =1;i<=N;i++){
       point = i;
       phold = 1.0/N;
       while(point<K){
         point *= 2;
         phold = phold/2.0;
       }
       p += phold;
     }
     System.out.println(p);
   }
} 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, phold = 1.0;
     int point;
     for (int i =1;i<=N;i++){
       point = i;
       phold = 1.0/N;
       while(point<K){
         point *= 2;
         phold = phold/2.0;
       }
       p += phold;
     }
     System.out.println(p);
   }
} Main
import 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, phold = 1.0;
     int point;
     for (int i =1;i<=N;i++){
       point = i;
       phold = 1.0/N;
       while(point<K){
         point *= 2;
         phold = phold/2.0;
       }
       p += phold;
     }
     System.out.println(p);
   }
}
