#include <stdio.h>
int main()
{
int n,count=0;
n=30;
while(n!=1){
if(n%2==0)
n=n/2;
else n=3*n+1;
count++;
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbigpIAp7CglpbnQgbixjb3VudD0wOwoJbj0zMDsKCXdoaWxlKG4hPTEpewoJaWYobiUyPT0wKQoJbj1uLzI7CgllbHNlIG49MypuKzE7Cgljb3VudCsrOwp9CglwcmludGYoIiVk5Zue44CAXG4iLGNvdW50KTsJCglyZXR1cm4gMDsKfQo=