m=1

yes "`sed -n -e '$p'`" | head -40 | while read a; do
    echo $m $a
    
    m=`expr $m \* 2`
done | cat -n | while read i m a; do
    echo $a | xargs -n1 | while read k; do
        echo $i `expr $k / $m`
    done
done | grep '[13579]$' | head -1 | awk '{print $1 - 1}'
