import java.util.Scanner;

class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int faceNum = sc.nextInt();
        int limitScore = sc.nextInt();
        
        int face, score, cnt;
        double pr = 0;
        for(face = 1; face <= faceNum; face++){
            score = face;
            cnt = 0;
            while(score < limitScore){
                score *= 2;
                cnt++;
            }
            pr += 1 / Math.pow(2, cnt);
        }

        System.out.println(pr / faceNum);
    }
} import java.util.Scanner; Scanner java.util class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int faceNum = sc.nextInt();
        int limitScore = sc.nextInt();
        
        int face, score, cnt;
        double pr = 0;
        for(face = 1; face <= faceNum; face++){
            score = face;
            cnt = 0;
            while(score < limitScore){
                score *= 2;
                cnt++;
            }
            pr += 1 / Math.pow(2, cnt);
        }

        System.out.println(pr / faceNum);
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int faceNum = sc.nextInt();
        int limitScore = sc.nextInt();
        
        int face, score, cnt;
        double pr = 0;
        for(face = 1; face <= faceNum; face++){
            score = face;
            cnt = 0;
            while(score < limitScore){
                score *= 2;
                cnt++;
            }
            pr += 1 / Math.pow(2, cnt);
        }

        System.out.println(pr / faceNum);
    } main {
        Scanner sc = new Scanner(System.in);
        int faceNum = sc.nextInt();
        int limitScore = sc.nextInt();
        
        int face, score, cnt;
        double pr = 0;
        for(face = 1; face <= faceNum; face++){
            score = face;
            cnt = 0;
            while(score < limitScore){
                score *= 2;
                cnt++;
            }
            pr += 1 / Math.pow(2, cnt);
        }

        System.out.println(pr / faceNum);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int faceNum = sc.nextInt(); faceNum sc.nextInt() sc.nextInt sc int limitScore = sc.nextInt(); limitScore sc.nextInt() sc.nextInt sc int face face score score cnt; cnt double pr = 0; pr 0 for(face = 1; face <= faceNum; face++){
            score = face;
            cnt = 0;
            while(score < limitScore){
                score *= 2;
                cnt++;
            }
            pr += 1 / Math.pow(2, cnt);
        } face = 1; face = 1 face 1 face <= faceNum face faceNum face++ face++ face {
            score = face;
            cnt = 0;
            while(score < limitScore){
                score *= 2;
                cnt++;
            }
            pr += 1 / Math.pow(2, cnt);
        } {
            score = face;
            cnt = 0;
            while(score < limitScore){
                score *= 2;
                cnt++;
            }
            pr += 1 / Math.pow(2, cnt);
        } score = face score face cnt = 0 cnt 0 while(score < limitScore){
                score *= 2;
                cnt++;
            } score < limitScore score limitScore {
                score *= 2;
                cnt++;
            } score *= 2 score 2 cnt++ cnt pr += 1 / Math.pow(2, cnt) pr 1 / Math.pow(2, cnt) 1 Math.pow(2, cnt) Math.pow Math 2 cnt System.out.println(pr / faceNum) System.out.println System.out System System.out pr / faceNum pr faceNum String[] args args
import java.util.Scanner;

class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int faceNum = sc.nextInt();
        int limitScore = sc.nextInt();
        
        int face, score, cnt;
        double pr = 0;
        for(face = 1; face <= faceNum; face++){
            score = face;
            cnt = 0;
            while(score < limitScore){
                score *= 2;
                cnt++;
            }
            pr += 1 / Math.pow(2, cnt);
        }

        System.out.println(pr / faceNum);
    }
}