#include <stdio.h>
int main(void) {
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+CgppbnQgbWFpbih2b2lkKSB7CmludCBuLGNvdW50PTA7Cm49MzA7CndoaWxlKG4hPTEpewoJaWYobiUyPT0wKXsKCQluPW4vMjsKCX0JCgllbHNlewoJCW49MypuKzE7Cgl9CQoJY291bnQrKzsKfQoKcHJpbnRmKCIlZFxuIixjb3VudCk7CglyZXR1cm4gMDsKfQo=