

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();
	    sc.close();
	    
	    double P = 0;
	    for(int i = 1; i < N+1; i++) {
	    	int count = 0;
	    	int j = i;
	    	while (j<K){
	    		j=2*j;
	    		count++;
	    	}
	    	
	    	P =   P + (Math.pow(0.5, count))/N;
	    }
	    System.out.println(P);

	}

} 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();
	    sc.close();
	    
	    double P = 0;
	    for(int i = 1; i < N+1; i++) {
	    	int count = 0;
	    	int j = i;
	    	while (j<K){
	    		j=2*j;
	    		count++;
	    	}
	    	
	    	P =   P + (Math.pow(0.5, count))/N;
	    }
	    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();
	    sc.close();
	    
	    double P = 0;
	    for(int i = 1; i < N+1; i++) {
	    	int count = 0;
	    	int j = i;
	    	while (j<K){
	    		j=2*j;
	    		count++;
	    	}
	    	
	    	P =   P + (Math.pow(0.5, count))/N;
	    }
	    System.out.println(P);

	} main {
		Scanner sc = new Scanner(System.in);
	    int N = sc.nextInt();
	    int K = sc.nextInt();
	    sc.close();
	    
	    double P = 0;
	    for(int i = 1; i < N+1; i++) {
	    	int count = 0;
	    	int j = i;
	    	while (j<K){
	    		j=2*j;
	    		count++;
	    	}
	    	
	    	P =   P + (Math.pow(0.5, count))/N;
	    }
	    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 sc.close() sc.close sc double P = 0; P 0 for(int i = 1; i < N+1; i++) {
	    	int count = 0;
	    	int j = i;
	    	while (j<K){
	    		j=2*j;
	    		count++;
	    	}
	    	
	    	P =   P + (Math.pow(0.5, count))/N;
	    } int i = 1; int i = 1; i 1 i < N+1 i N+1 N 1 i++ i++ i {
	    	int count = 0;
	    	int j = i;
	    	while (j<K){
	    		j=2*j;
	    		count++;
	    	}
	    	
	    	P =   P + (Math.pow(0.5, count))/N;
	    } {
	    	int count = 0;
	    	int j = i;
	    	while (j<K){
	    		j=2*j;
	    		count++;
	    	}
	    	
	    	P =   P + (Math.pow(0.5, count))/N;
	    } int count = 0; count 0 int j = i; j i while (j<K){
	    		j=2*j;
	    		count++;
	    	} j<K j K {
	    		j=2*j;
	    		count++;
	    	} j=2*j j 2*j 2 j count++ count P =   P + (Math.pow(0.5, count))/N P P + (Math.pow(0.5, count))/N P (Math.pow(0.5, count))/N (Math.pow(0.5, count)) Math.pow Math 0.5 count N 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();
	    sc.close();
	    
	    double P = 0;
	    for(int i = 1; i < N+1; i++) {
	    	int count = 0;
	    	int j = i;
	    	while (j<K){
	    		j=2*j;
	    		count++;
	    	}
	    	
	    	P =   P + (Math.pow(0.5, count))/N;
	    }
	    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();
	    sc.close();
	    
	    double P = 0;
	    for(int i = 1; i < N+1; i++) {
	    	int count = 0;
	    	int j = i;
	    	while (j<K){
	    		j=2*j;
	    		count++;
	    	}
	    	
	    	P =   P + (Math.pow(0.5, count))/N;
	    }
	    System.out.println(P);

	}

} 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();
	    sc.close();
	    
	    double P = 0;
	    for(int i = 1; i < N+1; i++) {
	    	int count = 0;
	    	int j = i;
	    	while (j<K){
	    		j=2*j;
	    		count++;
	    	}
	    	
	    	P =   P + (Math.pow(0.5, count))/N;
	    }
	    System.out.println(P);

	}

}
