read $_ -dx a for i in $a;{((w+=3^(b[i]^=2)));} echo $[w/4]