
read n k
x=0
ans=0

for i in $(seq $n)
do
  num=1

  while :
  do
    if [ $((i * num)) -gt $k ]
    then
      break
    fi
    num=$((num * 2))
  done
  ans=$(echo 1 $num $ans | awk '{printf("%1.15f" , $1 / $2 + $3)}')
done
echo $ans $n | awk '{printf("%1.15f" , $1 / $2)}'
