$n=<>; ($n,$c)=$n&1?$n&2?($n*3-1,'-'):($n*3+1,'+'):($n/2,'/'),push@a,$c while$n>1; print@a.$/,@a