read a b s b/s?b-s:s-b echo $[d=_,b=a,1_?_:s-1+2*!a):_+s]