import java.util.Scanner;

class Main {
    public static void main(String[] args)  {
	Scanner sc = new Scanner(System.in);

	int N, K;
	N = sc.nextInt();
	K = sc.nextInt();

	double probability_all = 0.0;
	for (int i = 0; i < N; i++) {
	    int sum = i + 1;
	    double count = 1.0;
	    while (sum < K) {
		sum *= 2;
		count /= 2;
	    }

	    probability_all += count;
	}

	System.out.println((double)(probability_all / N));
    }
} import java.util.Scanner; Scanner java.util class Main {
    public static void main(String[] args)  {
	Scanner sc = new Scanner(System.in);

	int N, K;
	N = sc.nextInt();
	K = sc.nextInt();

	double probability_all = 0.0;
	for (int i = 0; i < N; i++) {
	    int sum = i + 1;
	    double count = 1.0;
	    while (sum < K) {
		sum *= 2;
		count /= 2;
	    }

	    probability_all += count;
	}

	System.out.println((double)(probability_all / N));
    }
} Main public static void main(String[] args)  {
	Scanner sc = new Scanner(System.in);

	int N, K;
	N = sc.nextInt();
	K = sc.nextInt();

	double probability_all = 0.0;
	for (int i = 0; i < N; i++) {
	    int sum = i + 1;
	    double count = 1.0;
	    while (sum < K) {
		sum *= 2;
		count /= 2;
	    }

	    probability_all += count;
	}

	System.out.println((double)(probability_all / N));
    } main {
	Scanner sc = new Scanner(System.in);

	int N, K;
	N = sc.nextInt();
	K = sc.nextInt();

	double probability_all = 0.0;
	for (int i = 0; i < N; i++) {
	    int sum = i + 1;
	    double count = 1.0;
	    while (sum < K) {
		sum *= 2;
		count /= 2;
	    }

	    probability_all += count;
	}

	System.out.println((double)(probability_all / N));
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N N K; K N = sc.nextInt() N sc.nextInt() sc.nextInt sc K = sc.nextInt() K sc.nextInt() sc.nextInt sc double probability_all = 0.0; probability_all 0.0 for (int i = 0; i < N; i++) {
	    int sum = i + 1;
	    double count = 1.0;
	    while (sum < K) {
		sum *= 2;
		count /= 2;
	    }

	    probability_all += count;
	} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
	    int sum = i + 1;
	    double count = 1.0;
	    while (sum < K) {
		sum *= 2;
		count /= 2;
	    }

	    probability_all += count;
	} {
	    int sum = i + 1;
	    double count = 1.0;
	    while (sum < K) {
		sum *= 2;
		count /= 2;
	    }

	    probability_all += count;
	} int sum = i + 1; sum i + 1 i 1 double count = 1.0; count 1.0 while (sum < K) {
		sum *= 2;
		count /= 2;
	    } sum < K sum K {
		sum *= 2;
		count /= 2;
	    } sum *= 2 sum 2 count /= 2 count 2 probability_all += count probability_all count System.out.println((double)(probability_all / N)) System.out.println System.out System System.out (double)(probability_all / N) probability_all N String[] args args
import java.util.Scanner;

class Main {
    public static void main(String[] args)  {
	Scanner sc = new Scanner(System.in);

	int N, K;
	N = sc.nextInt();
	K = sc.nextInt();

	double probability_all = 0.0;
	for (int i = 0; i < N; i++) {
	    int sum = i + 1;
	    double count = 1.0;
	    while (sum < K) {
		sum *= 2;
		count /= 2;
	    }

	    probability_all += count;
	}

	System.out.println((double)(probability_all / N));
    }
}