a=input("a = ");
while a <>1
  if a/2 == floor(a/2) then 
  a=a/2; 
else 
  a=3*a+1 ;
  end
  disp(a);
end
