import java.util.Scanner;
public class Main{
public static void main(String args []){
Scanner sc = new Scanner(System.in);
System.out.println("Enter the number");
int i = sc.nextInt();
while(i != 1){
if(i%2 == 0){
i = i/2;
} else{
i = (i*3 + 1)/2;
}
}
System.out.println("Updated value of entered number is :"+i);
}
}