
import java.util.*;
import java.math.*;
public class Main {
  
  	public static double halfpow (int a){
			double d = 0.5;
			return Math.pow(d,a);
		}
	
	public static void main(String[] args){
		
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		double ans = 0;


        for (int i = 1; i < N+1; i++) {
			int cnt = 0;
            int j = i; 
			while (j < K)
			{
				j*=2;
				cnt++;
			}
  
			ans += halfpow(cnt);
		}
		ans = ans / N;
		
		System.out.println(ans);
	
	}
}
			 import java.util.*; util.* java import java.math.*; math.* java public class Main {
  
  	public static double halfpow (int a){
			double d = 0.5;
			return Math.pow(d,a);
		}
	
	public static void main(String[] args){
		
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		double ans = 0;


        for (int i = 1; i < N+1; i++) {
			int cnt = 0;
            int j = i; 
			while (j < K)
			{
				j*=2;
				cnt++;
			}
  
			ans += halfpow(cnt);
		}
		ans = ans / N;
		
		System.out.println(ans);
	
	}
} Main public static double halfpow (int a){
			double d = 0.5;
			return Math.pow(d,a);
		} halfpow {
			double d = 0.5;
			return Math.pow(d,a);
		} double d = 0.5; d 0.5 return Math.pow(d,a); Math.pow(d,a) Math.pow Math d a int a a public static void main(String[] args){
		
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		double ans = 0;


        for (int i = 1; i < N+1; i++) {
			int cnt = 0;
            int j = i; 
			while (j < K)
			{
				j*=2;
				cnt++;
			}
  
			ans += halfpow(cnt);
		}
		ans = ans / N;
		
		System.out.println(ans);
	
	} main {
		
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		double ans = 0;


        for (int i = 1; i < N+1; i++) {
			int cnt = 0;
            int j = i; 
			while (j < K)
			{
				j*=2;
				cnt++;
			}
  
			ans += halfpow(cnt);
		}
		ans = ans / N;
		
		System.out.println(ans);
	
	} 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 ans = 0; ans 0 for (int i = 1; i < N+1; i++) {
			int cnt = 0;
            int j = i; 
			while (j < K)
			{
				j*=2;
				cnt++;
			}
  
			ans += halfpow(cnt);
		} int i = 1; int i = 1; i 1 i < N+1 i N+1 N 1 i++ i++ i {
			int cnt = 0;
            int j = i; 
			while (j < K)
			{
				j*=2;
				cnt++;
			}
  
			ans += halfpow(cnt);
		} {
			int cnt = 0;
            int j = i; 
			while (j < K)
			{
				j*=2;
				cnt++;
			}
  
			ans += halfpow(cnt);
		} int cnt = 0; cnt 0 int j = i; j i while (j < K)
			{
				j*=2;
				cnt++;
			} j < K j K {
				j*=2;
				cnt++;
			} j*=2 j 2 cnt++ cnt ans += halfpow(cnt) ans halfpow(cnt) halfpow cnt ans = ans / N ans ans / N ans N System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
  
  	public static double halfpow (int a){
			double d = 0.5;
			return Math.pow(d,a);
		}
	
	public static void main(String[] args){
		
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		double ans = 0;


        for (int i = 1; i < N+1; i++) {
			int cnt = 0;
            int j = i; 
			while (j < K)
			{
				j*=2;
				cnt++;
			}
  
			ans += halfpow(cnt);
		}
		ans = ans / N;
		
		System.out.println(ans);
	
	}
} public class Main {
  
  	public static double halfpow (int a){
			double d = 0.5;
			return Math.pow(d,a);
		}
	
	public static void main(String[] args){
		
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		double ans = 0;


        for (int i = 1; i < N+1; i++) {
			int cnt = 0;
            int j = i; 
			while (j < K)
			{
				j*=2;
				cnt++;
			}
  
			ans += halfpow(cnt);
		}
		ans = ans / N;
		
		System.out.println(ans);
	
	}
} Main

import java.util.*;
import java.math.*;
public class Main {
  
  	public static double halfpow (int a){
			double d = 0.5;
			return Math.pow(d,a);
		}
	
	public static void main(String[] args){
		
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		double ans = 0;


        for (int i = 1; i < N+1; i++) {
			int cnt = 0;
            int j = i; 
			while (j < K)
			{
				j*=2;
				cnt++;
			}
  
			ans += halfpow(cnt);
		}
		ans = ans / N;
		
		System.out.println(ans);
	
	}
}
			