import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigDecimal;
import java.math.RoundingMode;

public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    
    String[] input = br.readLine().split(" ");
    double n = Double.parseDouble(input[0]);
    double k = Double.parseDouble(input[1]);
    
    double result = 0;
    
    for(int i=1; i<=n; i++){
      int coin = k<=i ? 0 : BigDecimal.valueOf(Math.log(k/i)/Math.log(2)).setScale(0, RoundingMode.UP).intValue();
      result += Math.pow(0.5, coin)/n;
    }
    System.out.println(result);
  }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.math.BigDecimal; BigDecimal java.math import java.math.RoundingMode; RoundingMode java.math public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    
    String[] input = br.readLine().split(" ");
    double n = Double.parseDouble(input[0]);
    double k = Double.parseDouble(input[1]);
    
    double result = 0;
    
    for(int i=1; i<=n; i++){
      int coin = k<=i ? 0 : BigDecimal.valueOf(Math.log(k/i)/Math.log(2)).setScale(0, RoundingMode.UP).intValue();
      result += Math.pow(0.5, coin)/n;
    }
    System.out.println(result);
  }
} Main public static void main(String[] args) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    
    String[] input = br.readLine().split(" ");
    double n = Double.parseDouble(input[0]);
    double k = Double.parseDouble(input[1]);
    
    double result = 0;
    
    for(int i=1; i<=n; i++){
      int coin = k<=i ? 0 : BigDecimal.valueOf(Math.log(k/i)/Math.log(2)).setScale(0, RoundingMode.UP).intValue();
      result += Math.pow(0.5, coin)/n;
    }
    System.out.println(result);
  } main {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    
    String[] input = br.readLine().split(" ");
    double n = Double.parseDouble(input[0]);
    double k = Double.parseDouble(input[1]);
    
    double result = 0;
    
    for(int i=1; i<=n; i++){
      int coin = k<=i ? 0 : BigDecimal.valueOf(Math.log(k/i)/Math.log(2)).setScale(0, RoundingMode.UP).intValue();
      result += Math.pow(0.5, coin)/n;
    }
    System.out.println(result);
  } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String[] input = br.readLine().split(" "); input br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " double n = Double.parseDouble(input[0]); n Double.parseDouble(input[0]) Double.parseDouble Double input[0] input 0 double k = Double.parseDouble(input[1]); k Double.parseDouble(input[1]) Double.parseDouble Double input[1] input 1 double result = 0; result 0 for(int i=1; i<=n; i++){
      int coin = k<=i ? 0 : BigDecimal.valueOf(Math.log(k/i)/Math.log(2)).setScale(0, RoundingMode.UP).intValue();
      result += Math.pow(0.5, coin)/n;
    } int i=1; int i=1; i 1 i<=n i n i++ i++ i {
      int coin = k<=i ? 0 : BigDecimal.valueOf(Math.log(k/i)/Math.log(2)).setScale(0, RoundingMode.UP).intValue();
      result += Math.pow(0.5, coin)/n;
    } {
      int coin = k<=i ? 0 : BigDecimal.valueOf(Math.log(k/i)/Math.log(2)).setScale(0, RoundingMode.UP).intValue();
      result += Math.pow(0.5, coin)/n;
    } int coin = k<=i ? 0 : BigDecimal.valueOf(Math.log(k/i)/Math.log(2)).setScale(0, RoundingMode.UP).intValue(); coin k<=i ? 0 : BigDecimal.valueOf(Math.log(k/i)/Math.log(2)).setScale(0, RoundingMode.UP).intValue() k<=i k i 0 BigDecimal.valueOf(Math.log(k/i)/Math.log(2)).setScale(0, RoundingMode.UP).intValue() BigDecimal.valueOf(Math.log(k/i)/Math.log(2)).setScale(0, RoundingMode.UP).intValue BigDecimal.valueOf(Math.log(k/i)/Math.log(2)).setScale(0, RoundingMode.UP) BigDecimal.valueOf(Math.log(k/i)/Math.log(2)).setScale BigDecimal.valueOf(Math.log(k/i)/Math.log(2)) BigDecimal.valueOf BigDecimal Math.log(k/i)/Math.log(2) Math.log(k/i) Math.log Math k/i k i Math.log(2) Math.log Math 2 0 RoundingMode.UP RoundingMode RoundingMode.UP result += Math.pow(0.5, coin)/n result Math.pow(0.5, coin)/n Math.pow(0.5, coin) Math.pow Math 0.5 coin n System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    
    String[] input = br.readLine().split(" ");
    double n = Double.parseDouble(input[0]);
    double k = Double.parseDouble(input[1]);
    
    double result = 0;
    
    for(int i=1; i<=n; i++){
      int coin = k<=i ? 0 : BigDecimal.valueOf(Math.log(k/i)/Math.log(2)).setScale(0, RoundingMode.UP).intValue();
      result += Math.pow(0.5, coin)/n;
    }
    System.out.println(result);
  }
} public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    
    String[] input = br.readLine().split(" ");
    double n = Double.parseDouble(input[0]);
    double k = Double.parseDouble(input[1]);
    
    double result = 0;
    
    for(int i=1; i<=n; i++){
      int coin = k<=i ? 0 : BigDecimal.valueOf(Math.log(k/i)/Math.log(2)).setScale(0, RoundingMode.UP).intValue();
      result += Math.pow(0.5, coin)/n;
    }
    System.out.println(result);
  }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigDecimal;
import java.math.RoundingMode;

public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    
    String[] input = br.readLine().split(" ");
    double n = Double.parseDouble(input[0]);
    double k = Double.parseDouble(input[1]);
    
    double result = 0;
    
    for(int i=1; i<=n; i++){
      int coin = k<=i ? 0 : BigDecimal.valueOf(Math.log(k/i)/Math.log(2)).setScale(0, RoundingMode.UP).intValue();
      result += Math.pow(0.5, coin)/n;
    }
    System.out.println(result);
  }
}