N, K = [int(_) for _ in input().split()]

scores = []
max_patterns = 0

for dice in range(1, N + 1):
    score = dice
    coin_counts = 0
    while score < K:
        score *= 2
        coin_counts += 1
    patterns = 2 ** coin_counts
    max_patterns = max(patterns, max_patterns)
    lose = patterns - 1
    win = 1
    scores.append((win, lose, patterns))

total_win = 0
total_lose = 0
for win, lose, patterns in scores:
    ratio = max_patterns // patterns
    total_win += win * ratio
    total_lose += lose * ratio

win_ratio = total_win / (total_win + total_lose)
print(win_ratio) int(_) for _ in input().split() for _ in input().split() _ input().split() ().split () input split for _ in input().split() int(_) int _ N, K = [int(_) for _ in input().split()] N [int(_) for _ in input().split()] K scores = [] scores [] max_patterns = 0 max_patterns 0 for dice in range(1, N + 1):
    score = dice
    coin_counts = 0
    while score < K:
        score *= 2
        coin_counts += 1
    patterns = 2 ** coin_counts
    max_patterns = max(patterns, max_patterns)
    lose = patterns - 1
    win = 1
    scores.append((win, lose, patterns)) dice range(1, N + 1) range 1 N + 1 N 1 score = dice score dice coin_counts = 0 coin_counts 0 while score < K:
        score *= 2
        coin_counts += 1
     score < K score K score *= 2 score 2 coin_counts += 1 coin_counts 1 patterns = 2 ** coin_counts patterns 2 ** coin_counts 2 coin_counts max_patterns = max(patterns, max_patterns) max_patterns max(patterns, max_patterns) max patterns max_patterns lose = patterns - 1 lose patterns - 1 patterns 1 win = 1 win 1 scores.append((win, lose, patterns)) scores.append scores append (win, lose, patterns) win lose patterns total_win = 0 total_win 0 total_lose = 0 total_lose 0 for win, lose, patterns in scores:
    ratio = max_patterns // patterns
    total_win += win * ratio
    total_lose += lose * ratio win lose patterns scores ratio = max_patterns // patterns ratio max_patterns // patterns max_patterns patterns total_win += win * ratio total_win win * ratio win ratio total_lose += lose * ratio total_lose lose * ratio lose ratio win_ratio = total_win / (total_win + total_lose) win_ratio total_win / (total_win + total_lose) total_win total_win + total_lose total_win total_lose print(win_ratio) print win_ratio N, K = [int(_) for _ in input().split()] [int(_) for _ in input().split()] N coin_counts += 1 1 coin_counts lose = patterns - 1 patterns - 1 lose total_win = 0 0 total_win K = [int(_) for _ in input().split()] [int(_) for _ in input().split()] K score *= 2 2 score max_patterns = max(patterns, max_patterns) max(patterns, max_patterns) max_patterns total_lose = 0 0 total_lose ratio = max_patterns // patterns max_patterns // patterns ratio total_lose += lose * ratio lose * ratio total_lose coin_counts = 0 0 coin_counts total_win += win * ratio win * ratio total_win score = dice dice score max_patterns = 0 0 max_patterns scores = [] [] scores win = 1 1 win patterns = 2 ** coin_counts 2 ** coin_counts patterns win_ratio = total_win / (total_win + total_lose) total_win / (total_win + total_lose) win_ratio
N, K = [int(_) for _ in input().split()]

scores = []
max_patterns = 0

for dice in range(1, N + 1):
    score = dice
    coin_counts = 0
    while score < K:
        score *= 2
        coin_counts += 1
    patterns = 2 ** coin_counts
    max_patterns = max(patterns, max_patterns)
    lose = patterns - 1
    win = 1
    scores.append((win, lose, patterns))

total_win = 0
total_lose = 0
for win, lose, patterns in scores:
    ratio = max_patterns // patterns
    total_win += win * ratio
    total_lose += lose * ratio

win_ratio = total_win / (total_win + total_lose)
print(win_ratio)
