semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main( ){
	  int n,a,i;
	  scanf("%d",&n);
	  do{
	  if(n==1){
		  printf("End");
		  n=0;
	  }
	  if(n!=0&&n!=1&&n%2==1){
		  a=n*3+1;
		  printf("%d*3+1=%d\n",n,a);
		  n=a;
	  }

  if(n!=0&&n!=1&&n%2==0){
		  a=n/2;
		  printf("%d/2=%d\n",n,a);
		  n=a;
	  }
  i++;
	  }
	  while(n!=0);
 


	return 0;
}
int main()
{
  int n,a;
  scanf("%d",&n);
  
  for(int i=1;i<1000;i++){
    if(n!=1&&n%2==0){
      a=n;
      n=n/2;
      printf("%d/2=%d\n",a,n);
    }else if(n!=1&&n%2!=0){
      a=n;
      n=n*3+1;
      printf("%d*3+1=%d\n",a,n);
    }else if(n==1){
      printf("End\n");
      break;
    }
  }
  
  return 0;
}
void guess(int);//?????
int main()//???
{
	int n=0;
	cin>>n;
	guess(n);//????
	return 0;
}
void guess(int n)//??guess??????????????????????
{
	if(n==1)//????
	{
		cout<<"End"<<endl;
	}
	else if(n%2==1)
	{
		cout<<n<<"*3+1="<<3*n+1<<endl;
		guess(3*n+1);
	}
	else if(n%2==0)
	{
		cout<<n<<"/2="<<n/2<<endl;
		guess(n/2);
	}
}
void solve(int n)
{
if(n==2)printf("2/2=1\n");
else if(n%2==0){printf("%d/2=%d\n",n,n/2);solve(n/2);}
else {printf("%d*3+1=%d\n",n,n*3+1);solve(n*3+1);}
}
void main()
{
int n;
scanf("%d",&n);
if(n==1)printf("End");
else
{solve(n);printf("End");}
}
int fun1(int i)
{
//printf("fun1");
	int j;
	j=i*3+1;
	printf("%d*3+1=%d\n",i,j);
	return j;
}



int fun2(int i)
{
	//printf("fun2");
	int j;
	j=i/2;
	printf("%d/2=%d\n",i,j);
	return j;
}


int main()
{
	int i;
	scanf("%d",&i);
	do
	{
		if(i%2==1&&i!=1)
			i=fun1(i);
		else if(i%2==0)
			i=fun2(i);
	}
	while(i!=1);
	printf("End");

	return 0;
}
void ou(int n);
void ji(int n);
int main()
{
	int  n;
	cin >> n;
	if (n % 2 == 1)
		ji(n);
	else
		ou(n);
}
void ou(int n)
{
	int answer;
	answer = n / 2;
	cout << n << "/2=" << answer << endl;
	if (answer % 2 == 0)
		ou(answer);
	else
		ji(answer);
}
void ji(int n)
{
	if (n == 1){
		cout << "End"; return;
	}
	int answer;
	answer = n * 3 + 1;
	cout << n << "*3+1=" << answer << endl;
	if (answer % 2 == 0)
		ou(answer);
	else
		ji(answer);
	
}
/*
 * ????.cpp
 *
 *  Created on: 2012-11-28
 *      Author: Lenovo
 */
void f(int n)
{

	if(n==1) return;
	if(n==2)
	{
		cout<<"2/2=1"<<endl;return;
	}
	else
	{
		if((n%2)==1)
		{
			cout<<n<<"*3+1="<<3*n+1<<endl;
			n=3*n+1;
			f(n);
		}
		else
		{
			cout<<n<<"/2="<<n/2<<endl;
			n=n/2;
			f(n);
		}
	}
}
int main()
{
	int n;
	cin>>n;
	f(n);
	cout<<"End";
	return 0;
}
main(){
       int n,a,b,i;
       scanf("%d",&n);
       if(n==1) printf("End\n");
       else{
            a=n;b=n;
           for(;;){
             if(a==1) break;
             if(a%2==0){
               b=a/2;
               printf("%d/2=%d\n",a,b);
               a=b;
             }
             else{
               b=a*3+1;
               printf("%d*3+1=%d\n",a,b);
               a=b;
             }
           }
           printf("End\n");
       }
}
int main()
{
	int n,k,i;
	scanf("%d", &n);
	if(n==1)
	{
		printf("End");
	}
	else
	{
		for(i=0;i>=0;i++){
			if(n==1)break;
			else if(n%2==1)
			{
			k=n*3+1;
			printf("%d*3+1=%d\n",n,k);
			n=k;
			}
			else if(n%2==0)
			{
				k=n/2;
				printf("%d/2=%d\n",n,k);
				n=k;
			}
			else if(n/2==1)
			{
				printf("%d/2=1\n",n);
				k=n;
			}
		
		}
		printf("End");
	}
	
	

	return 0;
}
int main(){
	int n,i=0,p[100];
	scanf("%d",&n);
	p[0]=n;
 while(p[i]!=1){
     if(p[i]%2==0){
		p[i+1]=p[i]/2;
		i=i+1;
    	printf("%d/2=%d\n",p[i-1],p[i]);
	 }
     else if(p[i]%2!=0){
		p[i+1]=p[i]*3+1;
		i=i+1;
        printf("%d*3+1=%d\n",p[i-1],p[i]);
	 }
 }
 if(p[i]==1) printf("End\n");



	return 0;
}
main()
{
      int a,b;
      scanf("%d",&a);
      if (a==1)
      {
              printf("End\n");
      }       
      else
      {
         while (a!=1) 
           {    
               if (a%2==1)
             {
              b=3*a+1;
              printf("%d*3+1=%d\n",a,b);
             }
              else 
             {
              b=a/2;
              printf("%d/2=%d\n",a,b);
             }
        a=b;
           } 
          printf("End\n");
     }   
      getchar(); 
      getchar();      
}
int EVEN(int a);
int ODD(int b);
int main()
{
	int d=0;
	int n;
	scanf("%d",&n);
	for(int i=0;d!=5;i++)
	{
		if(n==1)
		{
			d=5;
			printf("End\n");
		}
		else
		{
			if(n%2==0)
				n=EVEN(n);
			else
				n=ODD(n);
		}
	}
}
int EVEN(int a)
{
	printf("%d/2=%d\n",a,a/2);
	a=a/2;
	return a;
}
int ODD(int b)
{
	printf("%d*3+1=%d\n",b,b*3+1);
	b=b*3+1;
	return b;
}
void main()
{
	int n,m;
	scanf("%d",&n);
	if(n==1)
		printf("End");
loop:while(n%2==0)
	{
		m=n/2;
		printf("%d/2=%d\n",n,m);
		n=m;
		if(n==1)
		{printf("End");break;}
	}
	 if(n!=1)
	 {
	     m=n*3+1;
		 printf("%d*3+1=%d\n",n,m);
		 n=m;
		 goto loop;
	printf("End");
	 }
}
int main(){
    int n,i;
    scanf("%d",&n);
    while(n!=1)
                if (n%2==1) {
                            printf("%d*3+1=%d\n",n,n*3+1);
                            n=n*3+1;
                            }
                else {
                     printf("%d/2=%d\n",n,n/2);
                     n=n/2;
                     }
    printf("End");
    scanf("\n");
    return 0;
}
void main()
{
	int n,m;
	scanf("%d",&n);
	while(n>1)
	{
		if(n%2)
		{
			m=n*3+1;
			printf("%d*3+1=%d\n",n,m);
		}
		else
		{
			m=n/2;
			printf("%d/2=%d\n",n,m);
		}
		n=m;
	}
	printf("End");
}
void main()
{
	int m;
	scanf("%d",&m);
	if(m==1) printf("End");
	else 
	{
		do
	{
		int n;
		 if(m%2!=0)
		 {
			 n=m*3+1;
			 printf("%d*3+1=%d",m,n);
			 printf("\n");
			 m=n;
		 }
		 if(m%2==0)
		 {
			 n=m/2;
			 printf("%d/2=%d",m,n);
             printf("\n");
			 m=n;
		 }

	}while(m>1);
		
	printf("End");}
}
void main()
{
	int n,j,f1,f2;
	scanf("%d",&n);
	if(n==1)
		printf("End\n");
	else
	{ 
		f1=f2=n;
		do
		{ 
			if(f1%2==0)
			{
			        f2=f1/2;
		            printf("%d/2=%d\n",f1,f2);
					j=f1;
					f1=f2;
					f2=j;
			}
			else
			{
				f2=f1*3+1;
				printf("%d*3+1=%d\n",f1,f2);
				j=f1;
				f1=f2;
				f2=j;
			}
		}
		while(f1!=1);
		printf("End\n");
	}


}
void main()
{
   int n,i;
   scanf("%d",&n);
while(1)
{
	
	if(n%2==0)
   {
     printf("%d/2=%d\n",n,n/2);
     n=n/2;
	 if(n==1) 
	 {
		 printf("End");
		 break;
	 }
	 }
	if(n%2)
	{
	  if(n==1) 
	 {
		 printf("End");
		 break;
	 }
	  printf("%d*3+1=%d\n",n,n*3+1);
	  n=n*3+1;
	  
	}
	
}
}
void f(int n)
{
if(n==1)
{cout<<"End";
return;
}
if(n%2==0)
{cout<<n<<'/'<<2<<'='<<n/2<<endl;
f(n/2);
}
if(n%2==1)
{cout<<n<<'*'<<3<<'+'<<1<<'='<<3*n+1<<endl;
f(3*n+1);
}
}
int main()
{
	int n;
	cin>>n;
	f(n);
}
int main()
{
    int a;
    scanf("%d",&a);
    while (a!=1)
    {
          if(a%2!=0)
    {
              printf("%d*3+1=%d\n",a,3*a+1);
              a=3*a+1;
    }
    else
    {
              printf("%d/2=%d\n",a,a/2);
              a=a/2;
    }
}
printf("End");
getchar();
getchar();
getchar();
return 0;
}
int main()
{
    int i,j,m,n,s;
    int x[100],y[100];
    scanf("%d",&n);
    if(n==1)
    {  printf("End");return 0;}
    while(n>1)
    {
        if(n%2==0)
        { printf ("%d/2=%d\n",n,n/2);n=n/2;}
        else
        {  printf("%d*3+1=%d\n",n,n*3+1);n=n*3+1;}
    }
        if(n==1)
        {  printf("End");return 0;}
      
    return 0;
    }
//****************************************************************
// ????1000012789_2.cpp                                      *
// ???wusy                                                    *
// ???12,1                                                    *
// ???????                                                *
//****************************************************************
void jiaogu(int t);                                     // ??????
int main()
{
	int n;
	cin >> n;
	jiaogu(n);                                          // ????
	return 0;
}

void jiaogu(int t)                         
{
	int p;                                              // ??????
	if (t == 1)                                         // ???1?????                
		cout << "End" << endl;
	else
	{
		if (t % 2 == 0)                                 // ?????
		{
			p = t;
			t = t / 2;                                  // ??????
			cout << p << "/" << 2 << "=" << t << endl;                                     //??????
				jiaogu(t);                   
		}
		else 
		{                                               //??
			p = t;
			t = t * 3 + 1;
			cout <<  p << "*" << "3+1" << "=" << t << endl;
				jiaogu(t);
		}
	}
}
int n;
void main()
{
	int s(int s),b(int b);
	scanf("%d",&n);
	for(;n!=1;)
	{
		if (n%2==0) s(n);
		else b(n);
	}
	printf("End");
}
int s(int s)
{
	n=n/2;
	printf("%d/2=%d\n",2*n,n);
    return n;
}
int b(int b)
{
	n=n*3+1;
	printf("%d*3+1=%d\n",(n-1)/3,n);
	return n;
}
//*****************************
//*????????           *
//*?  ????  1100062709   *
//*???2011 .11 .15         *
//*****************************
int f (int number)                                                  //?????
{ 
    int n;
    if (number == 1)                                                //????????1 ???????? 
    {
            cout << "End" << endl;                                 //??end 
            return 0;
    }
    else
    {
        if(number % 2 == 0)                                         //????????
        {
               n = number / 2;                        
               cout << number << "/2" << "=" << n << endl;          //??????????????
               number = n;                                          //?n???number 
        }
        else
        {
            n = 3 * number + 1;                                     //???????? 
            cout << number<< "*3+1=" << n << endl;                  //???????????? 
            number = n;               
        }
        return f(number);                                           //??????
    }
}
int main()                                                          //????? 
{
    int number;              
    cin >> number;                                                  //?????
    f(number);                                                      //??????
    return 0;                                                       //????? 
}
main()
{
              int a;
              scanf("%d",&a);
              while(a>1)
{
              if(a%2==1)
              {
                        
                        printf("%d*3+1=%d\n",a,a*3+1);a=a*3+1;
                        }
              if(a%2==0);
{
              printf("%d/2=%d\n",a,a/2); a=a/2;
                             }
                             }
                       printf("End");
              getchar(); 
              getchar();
              return 0;
}
main()
{
    int i,j,k;
    scanf("%d",&i);
    if (i==1)
    printf("End");
    for (;i!=1;)
    {
    if  (i%2==0)
    {j=i/2;
    printf("%d/2=%d\n",i,j);}
    else
    {j=3*i+1;
    printf("%d*3+1=%d\n",i,j);}
    if (j==1)
    {printf("End");
    break;}
    else
    {
        if  (j%2==0)
    {i=j/2;
    printf("%d/2=%d\n",j,i);}
    else
    {i=3*j+1;
    printf("%d*3+1=%d\n",j,i);}
       if (i==1)
       {printf("End");
       break;}
    }
    }
}
int calculate(int x);
int main()
{
	int num;
	cin>>num;
	calculate(num);
	return 0;
}
int calculate(int x)
{
	if(x%2==0)
	{
		cout<<x<<"/2="<<x/2<<endl;
		x=x/2;
		if(x==1)
		{
			cout<<"End"<<endl;
		}
		else
		{
		    calculate(x);
		}
	}
	else if(x==1)
	{
		cout<<"End"<<endl;
	}
	else
	{
		cout<<x<<"*3+1="<<x*3+1<<endl;
		x=x*3+1;
		calculate(x);
	}
	
	return 0;
}
/*
 * jiaogucaixiang.cpp
 *
 *  Created on: 2012-11-20
 *      Author: AK
 */
int jiaogu(int a){                      //??????
	if(a==1) {cout<<"End"<<endl;return 0;}   //?????1??return 0????
	else if(a%2==1) {cout<<a<<"*3+1="<<3*a+1<<endl;return jiaogu(3*a+1);}//???????????????
	else {cout<<a<<"/2="<<a/2<<endl;return(jiaogu(a/2));}//???????????????
	return 0;//??
}
int main(){
	int a,b;
	cin>>a;
	b=jiaogu(a);
	return 0;
}
// ????.cpp : Defines the entry point for the console application.
// ???????????????????1???????
int cal(int n)                                         //?????cal?????????1???????
{
	if(n==1)                                           //?????1????End
		cout<<"End"<<endl;
	else if(n%2==0)                                    //???????????n/2=(n/2)?????
	{
		cout<<n<<"/2="<<(n/2)<<endl; 
		return cal(n/2);
	}
	else                                               //???????????n*3+1=?3*n+1??????
	{
		cout<<n<<"*3+1="<<(3*n+1)<<endl;
		return cal(3*n+1);
	}
}
int main()                                             //?????
{
	int n,m;
	cin>>n;
	m=cal(n);                                          //????cal??
	return 0;
}
/*
 * 123.cpp
 *
 *  Created on: 2013-11-29
 *      Author: 13248
 */

/*
 * 20131129.cpp
 *
 *  Created on: 2013-11-29
 *      Author: 13248
 */

void jiaogu(int x)
{
	if(x==1) {cout<<"End"<<endl;return;}
	else
	{
		if(x%2==1) {cout<<x<<"*3+1="<<x*3+1<<endl;return jiaogu(x*3+1);}
		else
		{
			cout<<x<<"/2="<<x/2<<endl;return jiaogu(x/2);
		}
	}
}
int main()
{
	int n;
	cin>>n;
	jiaogu(n);
	return 0;
}
int main()
{
	int f,i,j,n;
	scanf("%d",&n);
	if(n==1){
		printf("End\n");
		return 0;
	}
	do{
		if(n>1&&n%2!=0){
			f=(n*3)+1;
			printf("%d*3+1=%d\n",n,f);
			n=(n*3)+1;
		}
		if(n>1&&(n%2)==0){
			f=n/2;
			printf("%d/2=%d\n",n,f);
			n=n/2;
		}
	}while(n>1);
	printf("End\n");
	return 0;
}
void main()
{
	int n;
	scanf("%d",&n);
	for(;;)
	{   
		if(n==1) break;
		if(n%2==1)
		{
		   
		   printf("%d*3+1=%d",n,n*3+1);
		   n=n*3+1;
		}
		    
		else 
		{
			printf("%d/2=%d",n,n/2);
			n=n/2;
		}	
		printf("\n");
		
	}
	printf("End");
}
int a[100][100];
void change(int n)
{
	
	if (n==1)
	{
		cout<<"End"<<endl;
	}
	else
	{
		if (n%2==0)
		{
			cout<<n<<'/'<<2<<'='<<n/2<<endl;
			change(n/2);
		}
		else
		{
			cout<<n<<'*'<<3<<'+'<<1<<'='<<n*3+1<<endl;
			change(n*3+1);
		}
	}
}













int main()
{
	int n;
	cin>>n;
	change (n);

	



















	return 0;
}
int main(){
int n,m,i;
scanf("%d",&n);
if(n==1){
printf("End");
}else{
for(i=1;n!=1;i++){
	m=n;
	if(n%2!=0){
	n=n*3+1;
	printf("%d*3+1=%d\n",m,n);
	}else if(n%2==0){
	n=n/2;
	printf("%d/2=%d\n",m,n);
	}
	if(n==1){
	printf("End");
	}
}
}
return 0;
}
int main()
{
	int n,i,j,k,l,a,b;

	scanf("%d",&n);
	b=n;
	if(b==1)
	{
		printf("End");}

	else for(i=1;i<1000000;i++)
	{
		if(b%2==1)
		{a=b*3+1;
		printf("%d*3+1=%d\n",b,a);
		b=a;}
		else if(b%2==0)
		{a=b/2;
		printf("%d/2=%d\n",b,a);
		b=a;}
		if(a==1)
		{printf("End");
		break;}
	}
	


	return 0;
}
void Guess(int n)
{
    if (n == 1)
    {
        cout << "End" << endl;
    }
    else if (n % 2 != 0)
    {
        int result = n * 3 + 1;
        cout << n << "*3+1=" << result << endl;
        Guess(result);
    }
    else
    {
        int result = n / 2;
        cout << n << "/2=" << result << endl;
        Guess(result);
    }
}

int main()
{
    int n;
    cin >> n;
    Guess(n);
}
int main()
{  
  int n;//?????
  int temp;//??????
  cin>>n; 
  while (n!=1)
    {
      if (n % 2==0) 
        {
          temp=n / 2;
          cout<<n<<"/"<<"2"<<"="<<temp<<endl;    
        }  
      if (n % 2!=0)
        {
          temp=n*3+1;
          cout<<n<<"*"<<"3"<<"+"<<"1"<<"="<<temp<<endl;    
        } 
      n=temp; 
    } 
  if (n=1) cout<<"End"; 
  
  return 0; 
}
int main ()
{
    int n=0;
    cin >>n;
    while(n!=1)
    {
               if(n%2==0)
               { 
                   cout<<n<<"/2=";
                   n=n/2;
                   cout<<n<<endl;;
                   }
               else
               {
                   cout<<n<<"*3+1=";
                   n=n*3+1;
                   cout<<n<<endl;
                   }
               }
    cout <<"End"<<endl;
    cin.get();cin.get();cin.get();cin.get();cin.get();cin.get();cin.get();
    return 0;

}
/*
 * T1.cpp
 *
 *  Created on: 2012-11-18
 *      Author: weiwan
 *      Function:????
 */

int guess(int a)       //????
{
	int ans;
	if (a == 1){cout <<"End" <<endl;return 0;} //????????
	if (a % 2 != 0)      //????
	{
		ans = a * 3 + 1;
		cout <<a <<"*3+1=" <<ans <<endl;
		guess(ans);     //??????
	}
	if (a % 2 == 0)       //????
	{
		ans = a / 2;
		cout <<a <<"/2=" <<ans <<endl;
		guess(ans);     //??????
	}
	return 0;
}
int main()
{
	int n;
	cin >>n;
	guess(n);
	return 0;
}
void main()
{
	int n,m;
	scanf("%d",&n);
	if(n==1)printf("End");
	if(n!=1)
	{
		while(n!=1)
		{
			if(n%2==0)
			{
			  m=n/2;
			  printf("%d/2=%d\n",n,m);
			}
		    if(n%2!=0)
			{
			  m=n*3+1;
			  printf("%d*3+1=%d\n",n,m);
			}
			n=m;
		}
		printf("End");
	}
}
int main()
{
    int a;
    scanf("%d",&a);
    while(a!=1){
    while(a%2==1)
    {
     printf("%d*3+1=%d\n",a,a*3+1);
     a=a*3+1;
     continue;
                 }
     while(a%2==0)
     {
      printf("%d/2=%d\n",a,a/2);
      a=a/2;
      continue; }           
                  }
      printf("End");
    
     }
//****************************************
//*???????                              **
//*????? 1100012925**
//*???2011.11.13                        **
//****************************************
void oushu( int n )   //??n????????
{
	cout << n << "/2=" << n / 2 << endl;

}

void jishu ( int n )  //??n????????
{
	cout << n << "*3+1=" << n * 3 + 1 << endl;
}

void jiaogu ( int n )
{
	if ( n % 2 ==0 )  //??n???
	{
		oushu ( n );  //??oushu??
		n = n / 2;
	 }
	else             //??n???
	{
		jishu ( n );  //??jishu??
		n = n * 3 + 1;
	}
	if ( n > 1 )     //n???????1
		jiaogu ( n ); //????jiaogu??
}

int main()
{
	int n;
	cin >> n;
    if ( n > 1 )         //?n??1
    	jiaogu ( n );    //??jiaogu??
    cout << "End" << endl;  //??n=1???End
	return 0;
}
int main()
{
    int n,i,a,b;
    scanf("%d",&n);
    if(n==1)
    {
        printf("End");
    }
    else
    {
        do
        {
            i=n%2;
            if(i==1)
            {
                a=n*3+1;
                printf("%d*3+1=%d\n",n,a);
                n=a;
            }
            else
            {
                b=n/2;
                printf("%d/2=%d\n",n,b);
                n=b;
            }
        }
        while(n!=1);
        printf("End");
    }
    return 0;
}
int main()
{
	int n,a=0,b;
	scanf("%d",&n);
	if(n==1){printf("End");}
	if(n>1){
	for(a=0;a=1;a=0){
		if(n%2!=0){b=n;n=n*3+1;
		printf("%d*3+1=%d\n",b,n);}      
		if(n%2==0){b=n;n=n/2;
		printf("%d/2=%d\n",b,n);}
		if(n==1){break;}}
	printf("End");}
return 0;
}
int main(){
	int n,i,m,j;
	scanf("%d",&n);j=1000;
	for(i=0;i<j;i++){
		if(n==1){
		printf("End");
		break;
		}
		if(n!=1){
if(n%2==0){
		m=n/2;
		printf("%d/2=%d\n",n,m);
		n=m;	if(n==1){printf("End");
		break;}
		}
	if(n%2==1){
			m=n*3+1;
			printf("%d*3+1=%d\n",n,m);
			n=m;
	
		}
		}
	}
	return 0;
}
void cal (int x)
{
	if (x == 1)
		cout << "End" << endl;
	if (x > 1)
	{
	if (x % 2 != 0)
	{
		cout << x <<"*3+1=";
		x = x * 3 + 1;
		cout << x << endl;
	}
	if (x % 2 == 0)
	{
		cout << x <<"/2=";
		x = x / 2;
		cout << x << endl;
	}
	cal ( x );
	}
	return;
}

int main()
{
	int x;
	cin >> x;
	cal (x );
	return 0;
}
/*
 * WhatFuck.cpp
 *
 *  Created on: 2011-12-30
 *      Author: ???
 */

int main(){
	int n;
	cin>>n;
	while (1){
		if (n==1){
			cout<<"End";
			break;
		}
		else if(n%2==0){
			cout<<n<<"/"<<2<<"="<<n/2<<endl;
			n=n/2;
		}
		else{
			cout<<n<<"*"<<3<<"+"<<1<<"="<<n*3+1<<endl;
			n=n*3+1;
		}
	}
	return 0;
}
main()
{
      int a,b=0;
      scanf("%d",&a);
      do
      {
                     if(a==1)
                     break;
                     if(a%2!=0)
                     {
                          b=a;
                          a=a*3+1;
                          printf("%d*3+1=%d\n",b,a);
                     }
                     else
                     {
                         b=a;
                         a=a/2;
                         printf("%d/2=%d\n",b,a);
                     }
      }
      while(a!=1);
      if(a==1)
      printf("End");
      getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();getchar();
}
void main()
{
	int jisuan(int a);
	int n,z;
	scanf("%d",&n);
	if(n==1)
		printf("End\n");
	else
	{
	z=jisuan(n);
	while(z!=1)
		z=jisuan(z);
	if(z==1)
		printf("End\n");
	}
}
int jisuan(int a)
{
	int T;
	if(a%2==0)
	{T=a/2;
	printf("%d/2=%d\n",a,T);}
	else 
	{T=a*3+1;
	printf("%d*3+1=%d\n",a,T);}
	return(T);
}
int n;
int ji(int n)
{
	n = n * 3 + 1;
	cout << (n - 1) / 3 << "*3+1=" << n << endl;
	return n;
}

int ou(int n)
{
	n = n / 2;
	//cout << 'x' << n << endl;
	cout << n * 2 << "/2=" << n << endl;
	//cout << 'y' << n << endl;
	return n;
}

int main()
{
	cin >> n;
	while (n != 1)
	{
		if (n % 2 == 0)
			n = ou(n);
		if (n == 1)
			break;
		if (n % 2 == 1)
			n = ji(n);
	}
	cout << "End" << endl;
	return 0;
}
void change(int);
int main()
{ 
 int n;
 cin>>n;
  for(;n!=1;)
    {if(n%2==0) {cout<<n<<"/2="<<n/2<<endl;n=n/2;}
     if(n%2==1&&n!=1)  {cout<<n<<"*3+1="<<n*3+1<<endl;n=3*n+1;}
     }
  cout<<"End";
      

return 0;
}
int isodd( int n)
{
        if (n % 2 == 0)
                return 1;
        else
                return 0;
}

int forodd(int n)
{
        printf("%d/2=%d\n", n, n/2);
        return n/2;
}

int fornot(int n)
{
        printf("%d*3+1=%d\n", n, n*3+1);
        return (n*3+1);
}

int main()
{
        int a = 0;
   //     char k,s; id[120] = {0}, rate[120] = {0};

        scanf("%d\n", &a);
        while (a != 1) {
                if (isodd(a))
                        a = forodd(a);
                else
                        a = fornot(a);
        }
        printf("End");
        return 0;
}
void a(int n)
{
	if(n==1)
	{
		cout<<"End"<<endl;
		return;
	}
	switch(n%2)
	{
	case 1:
		{
			cout<<n<<"*3+1="<<n*3+1<<endl;
			a(n*3+1);
			break;
		}
	case 0:
		{
			cout<<n<<"/2="<<n/2<<endl;
			a(n/2);
			break;
		}
	}
}
int main()
{
	int n;
	cin>>n;
	a(n);
}
main()
{
int a,b,k,n;
scanf("%d",&n);
for(;n>1;)
{
	if (n%2==1) 
	{
		k=n*3+1;
		printf("%d*3+1=%d\n",n,k);
	}
	else 
	{
	    k=n/2;
		printf("%d/2=%d\n",n,k);
	}
	n=k;
}
printf("End");
return 0;
}
int main(){
int n,i,a[14444];
scanf("%d",&n);
a[0]=n;
i=0;
while(n>-1){
n=a[i]%2;
if(n==0){
a[i+1]=a[i]/2;
printf("%d/2=%d\n",a[i],a[i+1]);
}else if(n==1&&a[i]!=1){
	a[i+1]=3*a[i]+1;
	printf("%d*3+1=%d\n",a[i],a[i+1]);
}else if(a[i]==1){printf("End\n");
break;}





i++;
}






return 0;
}
int main(){
    int gujiao(int n);
    int n;
    cin >> n;
    gujiao(n);
    return 0;
}
int gujiao(int n){ 
    if (n == 2){
          cout << "2/2=1" << endl << "End" << endl;
          }
    else{
         if(n%2 == 0){
                cout << n << "/2=" << n/2 << endl;
                return gujiao(n/2);
                }
         else{
              if (n == 1){
                    cout << "End" << endl;
                    }
              else{
                   cout << n << "*3+1=" << n*3+1 << endl;
                   return gujiao(n*3+1);
                   }
              }
         }
}
void odd(int);
void even(int);
int n;
int main()
{
    scanf("%d",&n);
    even (n);

    return 0;
}
void odd(int n)
{
    if(n==1)
        printf("End");
    else
      {
          if(n%2==1)
        {
        printf("%d*3+1=%d\n",n,n*3+1);
        n=n*3+1;
        odd (n);
        }
        else even(n);
      }
}
void even(int n)
{
        if(n==1)
        printf("End");
    else
      {
          if(n%2==0)
        {
        printf("%d/2=%d\n",n,n/2);
        n=n/2;
        even (n);
        }
        else odd(n);
      }
}
int jiaogu(int a)
{
	if ( a == 1 )
		return 1;
	else if ( a % 2 == 0 )
	{
		cout << a << "/2=";
		return a / 2;
	}
	else
	{
		cout << a << "*3+1=";
		return a * 3 + 1;
	}
}

int main ()
{
	int a, i;
	cin >> a;
	if ( a == 1 )
	{
		cout << "End" << endl;
	}
	else
	{
		for ( i = 0; ; i ++ )
		{
			if ( a == 1 )
			{
				cout << "End" << endl;
				break;
			}
			else
			{
				a = jiaogu(a);
				cout << a << endl;
			}
		}
	}
	return 0; 
}
int main()
{
	int n,temp;
	cin>>n;
         if(n==1)
             cout<<"End";
         else
         { 
	do
	{
		if(n%2==1)
		{
			temp=n;                    //????n??????
			n=n*3+1;
			cout<<temp<<"*3+1="<<n<<endl; //????
		}
		else
		{
			temp=n;                //????n??????
			n=n/2;
			cout<<temp<<"/2="<<n<<endl;   //????
		}
	} while(n!=1);
         cout<<"End";
         }
	return 0;
}