read n _[n=n%2?n*3+1:n/2,n<2]+1 echo $[_]