using System;
public class Program
{
public static void Main()
Console.WriteLine("Enter a number");
int n = Convert.ToInt32(Console.ReadLine());
int n2 = 0;
if (n % 2 == 0) {
n2 = n / 2;
Console.WriteLine(n2);
}
else {
n2 = 3 * n + 1;
while (n2 != 1) {
if (n2 % 2 == 0) {
n2 = n2 / 2;
n2 = 3 * n2 + 1;