read -dx -aa for((i=++r<<15;j++/a?r<<=!!f,f%=j=1,i/=2:1;a[j]^=a[j]&i?f=f?f:a[j]:0)){ :;} echo $r