import java.util.Scanner;


class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    
    int n = Integer.parseInt(sc.next());
    int k = Integer.parseInt(sc.next());
    
    int[] firstDice = new int[n];
    
    for(int i=1;i<=n;i++){
      firstDice[i-1] = getExp(2,i,k);
    }
    int maxExp = firstDice[0];
    long upsum = 0;
    long downsum = pow(2,firstDice[0])*n;
    
    for(int i=0;i<n;i++){
      upsum+=pow(2,maxExp-firstDice[i]);
    }
    double answer = (double)upsum/downsum;
    
    System.out.print(answer);
    
    System.out.flush();
  }
  
  public static int getExp(int base , int first , int target){
    int exp = 1;
    int cnt = 0;
    while(first*exp<target){
      cnt++;
      exp*=base;
    }
    return cnt;
  }
  //x^n
  public static long pow(int x, int n){
    long ans = 1;
    while (n > 0) {
		if ((n & 1) == 1) {
			ans = ans * x;
		}
		x = x * x; 
		n >>= 1;
	}
	return ans;
  }
} import java.util.Scanner; Scanner java.util class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    
    int n = Integer.parseInt(sc.next());
    int k = Integer.parseInt(sc.next());
    
    int[] firstDice = new int[n];
    
    for(int i=1;i<=n;i++){
      firstDice[i-1] = getExp(2,i,k);
    }
    int maxExp = firstDice[0];
    long upsum = 0;
    long downsum = pow(2,firstDice[0])*n;
    
    for(int i=0;i<n;i++){
      upsum+=pow(2,maxExp-firstDice[i]);
    }
    double answer = (double)upsum/downsum;
    
    System.out.print(answer);
    
    System.out.flush();
  }
  
  public static int getExp(int base , int first , int target){
    int exp = 1;
    int cnt = 0;
    while(first*exp<target){
      cnt++;
      exp*=base;
    }
    return cnt;
  }
  //x^n
  public static long pow(int x, int n){
    long ans = 1;
    while (n > 0) {
		if ((n & 1) == 1) {
			ans = ans * x;
		}
		x = x * x; 
		n >>= 1;
	}
	return ans;
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    
    int n = Integer.parseInt(sc.next());
    int k = Integer.parseInt(sc.next());
    
    int[] firstDice = new int[n];
    
    for(int i=1;i<=n;i++){
      firstDice[i-1] = getExp(2,i,k);
    }
    int maxExp = firstDice[0];
    long upsum = 0;
    long downsum = pow(2,firstDice[0])*n;
    
    for(int i=0;i<n;i++){
      upsum+=pow(2,maxExp-firstDice[i]);
    }
    double answer = (double)upsum/downsum;
    
    System.out.print(answer);
    
    System.out.flush();
  } main {
    Scanner sc = new Scanner(System.in);
    
    int n = Integer.parseInt(sc.next());
    int k = Integer.parseInt(sc.next());
    
    int[] firstDice = new int[n];
    
    for(int i=1;i<=n;i++){
      firstDice[i-1] = getExp(2,i,k);
    }
    int maxExp = firstDice[0];
    long upsum = 0;
    long downsum = pow(2,firstDice[0])*n;
    
    for(int i=0;i<n;i++){
      upsum+=pow(2,maxExp-firstDice[i]);
    }
    double answer = (double)upsum/downsum;
    
    System.out.print(answer);
    
    System.out.flush();
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = Integer.parseInt(sc.next()); n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int k = Integer.parseInt(sc.next()); k Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int[] firstDice = new int[n]; firstDice new int[n] n for(int i=1;i<=n;i++){
      firstDice[i-1] = getExp(2,i,k);
    } int i=1; int i=1; i 1 i<=n i n i++ i++ i {
      firstDice[i-1] = getExp(2,i,k);
    } {
      firstDice[i-1] = getExp(2,i,k);
    } firstDice[i-1] = getExp(2,i,k) firstDice[i-1] firstDice i-1 i 1 getExp(2,i,k) getExp 2 i k int maxExp = firstDice[0]; maxExp firstDice[0] firstDice 0 long upsum = 0; upsum 0 long downsum = pow(2,firstDice[0])*n; downsum pow(2,firstDice[0])*n pow(2,firstDice[0]) pow 2 firstDice[0] firstDice 0 n for(int i=0;i<n;i++){
      upsum+=pow(2,maxExp-firstDice[i]);
    } int i=0; int i=0; i 0 i<n i n i++ i++ i {
      upsum+=pow(2,maxExp-firstDice[i]);
    } {
      upsum+=pow(2,maxExp-firstDice[i]);
    } upsum+=pow(2,maxExp-firstDice[i]) upsum pow(2,maxExp-firstDice[i]) pow 2 maxExp-firstDice[i] maxExp firstDice[i] firstDice i double answer = (double)upsum/downsum; answer (double)upsum/downsum (double)upsum downsum System.out.print(answer) System.out.print System.out System System.out answer System.out.flush() System.out.flush System.out System System.out String[] args args public static int getExp(int base , int first , int target){
    int exp = 1;
    int cnt = 0;
    while(first*exp<target){
      cnt++;
      exp*=base;
    }
    return cnt;
  } getExp {
    int exp = 1;
    int cnt = 0;
    while(first*exp<target){
      cnt++;
      exp*=base;
    }
    return cnt;
  } int exp = 1; exp 1 int cnt = 0; cnt 0 while(first*exp<target){
      cnt++;
      exp*=base;
    } first*exp<target first*exp first exp target {
      cnt++;
      exp*=base;
    } cnt++ cnt exp*=base exp base return cnt; cnt int base base int first first int target target //x^n
  public static long pow(int x, int n){
    long ans = 1;
    while (n > 0) {
		if ((n & 1) == 1) {
			ans = ans * x;
		}
		x = x * x; 
		n >>= 1;
	}
	return ans;
  } pow {
    long ans = 1;
    while (n > 0) {
		if ((n & 1) == 1) {
			ans = ans * x;
		}
		x = x * x; 
		n >>= 1;
	}
	return ans;
  } long ans = 1; ans 1 while (n > 0) {
		if ((n & 1) == 1) {
			ans = ans * x;
		}
		x = x * x; 
		n >>= 1;
	} n > 0 n 0 {
		if ((n & 1) == 1) {
			ans = ans * x;
		}
		x = x * x; 
		n >>= 1;
	} if ((n & 1) == 1) {
			ans = ans * x;
		} (n & 1) == 1 (n & 1) n 1 1 {
			ans = ans * x;
		} ans = ans * x ans ans * x ans x x = x * x x x * x x x n >>= 1 n 1 return ans; ans int x x int n n
import java.util.Scanner;


class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    
    int n = Integer.parseInt(sc.next());
    int k = Integer.parseInt(sc.next());
    
    int[] firstDice = new int[n];
    
    for(int i=1;i<=n;i++){
      firstDice[i-1] = getExp(2,i,k);
    }
    int maxExp = firstDice[0];
    long upsum = 0;
    long downsum = pow(2,firstDice[0])*n;
    
    for(int i=0;i<n;i++){
      upsum+=pow(2,maxExp-firstDice[i]);
    }
    double answer = (double)upsum/downsum;
    
    System.out.print(answer);
    
    System.out.flush();
  }
  
  public static int getExp(int base , int first , int target){
    int exp = 1;
    int cnt = 0;
    while(first*exp<target){
      cnt++;
      exp*=base;
    }
    return cnt;
  }
  //x^n
  public static long pow(int x, int n){
    long ans = 1;
    while (n > 0) {
		if ((n & 1) == 1) {
			ans = ans * x;
		}
		x = x * x; 
		n >>= 1;
	}
	return ans;
  }
}