read -n1 s&&. ./* $[a+=x=8**s/8,m|=x] f="c-=c+1&4?3:~(c|c/2|c/4)&73?j+=c%8,c-c/8:73,c&&f" b=a+8**t o=b\&m*5 $[h=8**{0..8},b/h%8>1&&(j=0,c=b-2*h,f,o*=j)] ((o|b&b/4&m|++t>9))||echo $t