read a b
echo $[b={,1-}b,b%3?~b%3?a:-a:0]