import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main{
  public static void main(String args[]){
      String str ;
      BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
       try {
            str = reader.readLine();
            reader.close();
         	String[] astr = str.split(" ");
      long n = Long.parseLong(astr[0]);
      long k = Long.parseLong(astr[1]);
      double result = 0;
      for(long i = 1; i <= n; i++){
          long p = 0, a = i;	
          while(a < k){
              a = a * 2;
              p++;
          }
          double tmp = 0.5;
          for(long j = 1; j < p; j++){
              tmp = tmp * 0.5;
          }
        if(p != 0)
          result = result + tmp;
        else
          result = result + 1;
      }
      result = result / n;
      System.out.print(result);
        } catch (IOException e) {
            e.printStackTrace();
        }
  }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main{
  public static void main(String args[]){
      String str ;
      BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
       try {
            str = reader.readLine();
            reader.close();
         	String[] astr = str.split(" ");
      long n = Long.parseLong(astr[0]);
      long k = Long.parseLong(astr[1]);
      double result = 0;
      for(long i = 1; i <= n; i++){
          long p = 0, a = i;	
          while(a < k){
              a = a * 2;
              p++;
          }
          double tmp = 0.5;
          for(long j = 1; j < p; j++){
              tmp = tmp * 0.5;
          }
        if(p != 0)
          result = result + tmp;
        else
          result = result + 1;
      }
      result = result / n;
      System.out.print(result);
        } catch (IOException e) {
            e.printStackTrace();
        }
  }
} Main public static void main(String args[]){
      String str ;
      BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
       try {
            str = reader.readLine();
            reader.close();
         	String[] astr = str.split(" ");
      long n = Long.parseLong(astr[0]);
      long k = Long.parseLong(astr[1]);
      double result = 0;
      for(long i = 1; i <= n; i++){
          long p = 0, a = i;	
          while(a < k){
              a = a * 2;
              p++;
          }
          double tmp = 0.5;
          for(long j = 1; j < p; j++){
              tmp = tmp * 0.5;
          }
        if(p != 0)
          result = result + tmp;
        else
          result = result + 1;
      }
      result = result / n;
      System.out.print(result);
        } catch (IOException e) {
            e.printStackTrace();
        }
  } main {
      String str ;
      BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
       try {
            str = reader.readLine();
            reader.close();
         	String[] astr = str.split(" ");
      long n = Long.parseLong(astr[0]);
      long k = Long.parseLong(astr[1]);
      double result = 0;
      for(long i = 1; i <= n; i++){
          long p = 0, a = i;	
          while(a < k){
              a = a * 2;
              p++;
          }
          double tmp = 0.5;
          for(long j = 1; j < p; j++){
              tmp = tmp * 0.5;
          }
        if(p != 0)
          result = result + tmp;
        else
          result = result + 1;
      }
      result = result / n;
      System.out.print(result);
        } catch (IOException e) {
            e.printStackTrace();
        }
  } String str ; str BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); reader new BufferedReader(new InputStreamReader(System.in)) try {
            str = reader.readLine();
            reader.close();
         	String[] astr = str.split(" ");
      long n = Long.parseLong(astr[0]);
      long k = Long.parseLong(astr[1]);
      double result = 0;
      for(long i = 1; i <= n; i++){
          long p = 0, a = i;	
          while(a < k){
              a = a * 2;
              p++;
          }
          double tmp = 0.5;
          for(long j = 1; j < p; j++){
              tmp = tmp * 0.5;
          }
        if(p != 0)
          result = result + tmp;
        else
          result = result + 1;
      }
      result = result / n;
      System.out.print(result);
        } catch (IOException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        } IOException e {
            e.printStackTrace();
        } e.printStackTrace() e.printStackTrace e {
            str = reader.readLine();
            reader.close();
         	String[] astr = str.split(" ");
      long n = Long.parseLong(astr[0]);
      long k = Long.parseLong(astr[1]);
      double result = 0;
      for(long i = 1; i <= n; i++){
          long p = 0, a = i;	
          while(a < k){
              a = a * 2;
              p++;
          }
          double tmp = 0.5;
          for(long j = 1; j < p; j++){
              tmp = tmp * 0.5;
          }
        if(p != 0)
          result = result + tmp;
        else
          result = result + 1;
      }
      result = result / n;
      System.out.print(result);
        } str = reader.readLine() str reader.readLine() reader.readLine reader reader.close() reader.close reader String[] astr = str.split(" "); astr str.split(" ") str.split str " " long n = Long.parseLong(astr[0]); n Long.parseLong(astr[0]) Long.parseLong Long astr[0] astr 0 long k = Long.parseLong(astr[1]); k Long.parseLong(astr[1]) Long.parseLong Long astr[1] astr 1 double result = 0; result 0 for(long i = 1; i <= n; i++){
          long p = 0, a = i;	
          while(a < k){
              a = a * 2;
              p++;
          }
          double tmp = 0.5;
          for(long j = 1; j < p; j++){
              tmp = tmp * 0.5;
          }
        if(p != 0)
          result = result + tmp;
        else
          result = result + 1;
      } long i = 1; long i = 1; i 1 i <= n i n i++ i++ i {
          long p = 0, a = i;	
          while(a < k){
              a = a * 2;
              p++;
          }
          double tmp = 0.5;
          for(long j = 1; j < p; j++){
              tmp = tmp * 0.5;
          }
        if(p != 0)
          result = result + tmp;
        else
          result = result + 1;
      } {
          long p = 0, a = i;	
          while(a < k){
              a = a * 2;
              p++;
          }
          double tmp = 0.5;
          for(long j = 1; j < p; j++){
              tmp = tmp * 0.5;
          }
        if(p != 0)
          result = result + tmp;
        else
          result = result + 1;
      } long p = 0 p 0 a = i; a i while(a < k){
              a = a * 2;
              p++;
          } a < k a k {
              a = a * 2;
              p++;
          } a = a * 2 a a * 2 a 2 p++ p double tmp = 0.5; tmp 0.5 for(long j = 1; j < p; j++){
              tmp = tmp * 0.5;
          } long j = 1; long j = 1; j 1 j < p j p j++ j++ j {
              tmp = tmp * 0.5;
          } {
              tmp = tmp * 0.5;
          } tmp = tmp * 0.5 tmp tmp * 0.5 tmp 0.5 if(p != 0)
          result = result + tmp;
        else
          result = result + 1; p != 0 p 0 result = result + tmp result result + tmp result tmp result = result + 1 result result + 1 result 1 result = result / n result result / n result n System.out.print(result) System.out.print System.out System System.out result String args[] args public class Main{
  public static void main(String args[]){
      String str ;
      BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
       try {
            str = reader.readLine();
            reader.close();
         	String[] astr = str.split(" ");
      long n = Long.parseLong(astr[0]);
      long k = Long.parseLong(astr[1]);
      double result = 0;
      for(long i = 1; i <= n; i++){
          long p = 0, a = i;	
          while(a < k){
              a = a * 2;
              p++;
          }
          double tmp = 0.5;
          for(long j = 1; j < p; j++){
              tmp = tmp * 0.5;
          }
        if(p != 0)
          result = result + tmp;
        else
          result = result + 1;
      }
      result = result / n;
      System.out.print(result);
        } catch (IOException e) {
            e.printStackTrace();
        }
  }
} public class Main{
  public static void main(String args[]){
      String str ;
      BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
       try {
            str = reader.readLine();
            reader.close();
         	String[] astr = str.split(" ");
      long n = Long.parseLong(astr[0]);
      long k = Long.parseLong(astr[1]);
      double result = 0;
      for(long i = 1; i <= n; i++){
          long p = 0, a = i;	
          while(a < k){
              a = a * 2;
              p++;
          }
          double tmp = 0.5;
          for(long j = 1; j < p; j++){
              tmp = tmp * 0.5;
          }
        if(p != 0)
          result = result + tmp;
        else
          result = result + 1;
      }
      result = result / n;
      System.out.print(result);
        } catch (IOException e) {
            e.printStackTrace();
        }
  }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main{
  public static void main(String args[]){
      String str ;
      BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
       try {
            str = reader.readLine();
            reader.close();
         	String[] astr = str.split(" ");
      long n = Long.parseLong(astr[0]);
      long k = Long.parseLong(astr[1]);
      double result = 0;
      for(long i = 1; i <= n; i++){
          long p = 0, a = i;	
          while(a < k){
              a = a * 2;
              p++;
          }
          double tmp = 0.5;
          for(long j = 1; j < p; j++){
              tmp = tmp * 0.5;
          }
        if(p != 0)
          result = result + tmp;
        else
          result = result + 1;
      }
      result = result / n;
      System.out.print(result);
        } catch (IOException e) {
            e.printStackTrace();
        }
  }
}
