semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main(){
	int n;
	int m;
	scanf("%d",&n);
	int i;
	for(i=0;i<MAX;i++){
		if(n!=1){
			if(n%2!=0){
				m=n*3+1;
				printf("%d*3+1=%d\n",n,m);
				n=m;
			}else{
				m=n/2;
				printf("%d/2=%d\n",n,m);
				n=m;
			}
		}else{
			printf("End");
			break;
		}
	}
	
	return 0;
}
/**
* @file 1000012907_2.cpp
* @author ???
* @date 2010?12?4
* @description
* ??????: ????
*/
int f(int n);
int main() 
{
	int num;
	cin >> num;
	f(num);
	return 0;
}
int f(int n)
{
	if (n == 1)
	{
		cout << "End";
	}
	else if (n % 2 == 0)
	{
		cout << n << "/" << "2" << "=" << n / 2 << endl;
		return f(n / 2);
	}
	else 
	{
		cout << n << "*" << "3" << "+" << "1" << "=" << 3 * n + 1 << endl;
		return f(3 * n + 1);
	}
}
int main()
{
	int n=0,result=0,i=0;
	scanf("%d",&n);
	for(i=1;1;i++)
	{
		if(n==1)
		{
			printf("End\n");
			break;
		}
		if(n%2==0)
		{
			result=n/2;
			printf("%d/2=%d\n",n,result);
			n=result;
		}else if(n%2==1){
			result=n*3+1;
			printf("%d*3+1=%d\n",n,result);
			n=result;
		}

	}
	return 0;
}
int main()
{
  int n,i,k;
  scanf("%d",&n);
    while(n>1)
      {
        if(n%2==1) 
           {
             printf("%d*3+1=%d\n",n,(n*3+1));
             n=n*3+1;
            }
          if(n%2==0)
            {
              printf("%d/2=%d\n",n,(n/2));
             n=n/2;
            }
       }
     printf("End");
return 0;
}
main()
{
      int x,a,b;
      scanf("%d",&x);
      
      while(x!=1)
      {
         if(x%2==0)
         {
         printf("%d/2=%d\n",x,x/2);
         x=x/2;
         }
         else
         {
             printf("%d*3+1=%d\n",x,x*3+1);
         x=x*3+1;
         }
      
      }
      if(x==1)
      {printf("End");}
      
      
      
      
      getchar();
      getchar();
      }
//************************
//**???????
//**?????  1100017658
//**???2011.11.15
//************************
void check(int, int flag[]);        // ?????
int main()                          // ?????
{
	int n, flag[1] = {0};           // ????
	cin >> n;                       // ?? n
    check(n, flag);                 // ????
    cout << "End";                  // ?? End
	return 0;
}                                   // ?????

void check(int n, int flag[])       // ?????
{
	int a, b;
	if (flag[0] == 1)
        return;                     // ?????????????
	if (n == 1)
	{
	    flag[0] = 1;
	    return;
	}                               // ????
	if (n != 1 && n % 2 == 1 && flag[0] == 0)
	{
		a = n;
		n = n * 3 + 1;
		cout << a << "*3+1=" << n << endl;
		check(n, flag);
	}                               // ?????
	if (n != 1 && n % 2 == 0 && flag[0] == 0)
	{
		b = n;
		n = n / 2;
		cout << b << "/2=" << n << endl;
		check(n, flag);
	}                               // ?????
}                                   // ?????
main()
{
      int a,b;
      scanf("%d",&a);
     loop:if(a==1)
     {
     printf("End");
     getchar();
     getchar();
     return 0;
     }
     else if(a%2!=0)
      {
       {
                 b=a*3+1;
       }
       printf("%d*3+1=%d\n",a,b);
       a=b;
      }
      else if(a%2==0)
      {
       {
           b=a/2;
       }
       printf("%d/2=%d\n",a,b);
       a=b;
      }
      goto loop;
}
int main ()
{
 int a,b,c;
 cin>>a;
 c=0;
 while (a!=1)
 {
  b=a%2;//??a????
  if (b)
  {
	  c=a*3+1;
      cout<<a<<"*"<<3<<"+"<<1<<"="<<c<<endl;
      a=c;//??a??????
   }
  else 
  {
	  c=a/2;
      cout<<a<<"/"<<2<<"="<<c<<endl;//a??????
      a=c;//??a??
  }
 }
 cout<<"End"<<endl;//???????End
 return 0;
}
int main()
{
	int n,a,b,c=0;
	scanf("%d",&n);
	a=n;
	if(n==1){
		printf("End");
	}else{
			for(;1<a;){
				if(a==1){break;}else{
				if(a%2==0){
					b=a;
					a=a/2;
					printf("%d/2=%d",b,a);
					printf("\n");}else{
				if(a%2==1){
					b=a;
					a=a*3+1;
					printf("%d*3+1=%d",b,a);
					printf("\n");}
				
			}
		
					}}printf("End");}

	return 0;
}
int main()
{
	void odd(int);/*??*/
	void even(int);/*??*/
	int n;
	scanf("%d",&n);
	if(n%2==0)
		even(n);
	else if(n!=1)
		odd(n);
	else
		printf("End");
	return 0;
}
void odd(int n)
{
	void even(int);
	int m;
	m=n*3+1;
	printf("%d*3+1=%d\n",n,m);
	if(m%2==0)
		even(m);
	else if(m!=1)
		odd(m);
	else printf("End");
}
void even(int n)
{
	int m;
	m=n/2;
	printf("%d/2=%d\n",n,m);
	if(m%2==0)
		even(m);
	else if(m!=1)
		odd(m);
	else
		printf("End");
}
int main()
{
	int n,s,r;
	scanf("%d",&n);
	if(n==1)
	{
		printf("End");
		return 0;
	}
	s=n;
	for(r=1;s!=1;r++)
	{
		if(n%2!=0)
		{
			s=n*3+1;
			printf("%d*3+1=%d\n",n,s);
			n=s;
		}
		else if(n%2==0)
		{
			s=n/2;
			printf("%d/2=%d\n",n,s);
			n=s;
		}
	}
	printf("End");
	return 0;
}
/*
 *???: 1.cpp
 *??????
 *????: 2012-11-18
 *??: ????
 */


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

int main ()
{
    int x;
    cin >> x;
    Try(x);
    return 0;
}
int main()
{
    int num;
    cin>>num;
    if(num>1)
    for(int i=0;;i++){
    if(num%2==1)
    {
    cout<<num;
    num=num*3+1;
    cout<<"*3+1="<<num<<endl;
    }
    if(num%2==0)
    {
    cout<<num;
    num=num/2;
    cout<<"/2="<<num<<endl;
    if(num==1)
    break;
    }
    }
    if(num==1)
  cout<<"End"<<endl;
    return 0;
}
/*
 * ????.cpp
 *
 *  Created on: 2010-12-15
 *      Author: Administrator
 */
void f(int n){
	if(n==1){cout<<"End"<<endl;

	}
    else if(n%2==0){
		cout<<n<<"/2="<<n/2<<endl;
		f(n/2);
	}
	else{
		cout<<n<<"*3+1="<<n*3+1<<endl;
		f(3*n+1);
	}
}
int main(){
	int n;
	cin>>n;
	f(n);
	return 0;
}
int main()
{
	int n, m, flag = 0;
	cin >> n;
	while (flag == 0)
	{
		if (n == 1)
		{
			cout << "End";
			flag = 1;
		}
		else if (n % 2 != 0 && n != 1)
		{
			m = n;
			n = n * 3 + 1;
			cout << m << '*' << 3 << '+' << 1 << '=' << n << endl;	
		}
		if (n % 2 == 0)
		{
			m = n;
			n = n / 2;
			cout << m << '/' << 2 << '=' << n << endl;
			if (n == 1)
			{
				cout << "End";
				flag = 1;
			}
			else
				flag = 0;
		}
	}
	return 0;
}
main ()
{
     int a,b,c,d,e,f,g;
     scanf("%d",&a);
     if (a!=1)
     {
     while (a!=1)
     {
           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");
}
int jiaogu(int n)
{
    if(n==1)
    {
        cout<<"End";    
    }
    else if(n==2)
    {   
        cout<<"2/2=1"<<endl;
        return jiaogu(1);
    }
    else if(n%2==1)
    {
        cout<<n<<"*3+1="<<3*n + 1<<endl;
        return jiaogu(n*3+1);      
    }
    else
    {
        cout<<n<<"/2="<<n/2<<endl;
        return jiaogu(n/2);
    }
} 
int main()
{
    int n;
    cin>>n;
    jiaogu(n);
    int x;cin>>x;
    return 0;
    
    
}
void jg(int a)
{
       int t =0;
	if (a==1) cout<<"End";
	else if (a%2==1)
	{
		t=a*3+1;
	cout<<a<<"*3+1="<<t<<endl;
		jg(t);
		}
		else
		{
			t=a/2;
			cout<<a<<"/2="<<t<<endl;
			jg(t);
		}
	}

int main()
{
	int a=0;
	cin>>a;
	jg(a);
	return 0;
	}
int main()
{
	int n;
	scanf("%d", &n);
	if(n==1)
	{
		printf("End");
		return 0;
	}
	else
	{
	int a, b;
	a=n;
	int i=1;
	while (a!=1)
	{
		b=a;
		if (a%2!=0)
		{
			a=a*3+1;
			printf("%d*3+1=%d\n", b, a);
		}
		else 
		{
			a=a/2;
			printf("%d/2=%d\n", b, a);
		}
		i++;
	}
	}
	printf("End");
	return 0;
}
void main()
{
	int i,j,k,n;scanf("%d",&n);
	for(;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;
		}
	}
	printf("End");
}
int main(){
	int n,i,d;
	scanf("%d",&n);
	for(i=0;i>=0;i++){
		if(n==1){
			printf("End\n");
			break;
		}
		else if(n%2!=0){
			d=n*3+1;
			printf("%d*3+1=%d\n",n,d);
		}
		else if(n%2==0){
			d=n/2;
			printf("%d/2=%d\n",n,d);
		}
		n=d;
	}
	return 0;
}
//****************************************************** 
//* ? ? ?   ?? ? ? ?                           *
//* ? ?      ?? ? ?                              *
//* ? ? ? ??2010 ? 12 ? 2 ?                    * 
//* ? ? ? ??? ? ? ?                           *
//* ? ?      ?1000010439                            *
//******************************************************
void jiaogu(int n)                               //??????????,????,???n 
{   
     if(n == 1)                                  //?n?1???End????? 
     cout << "End";
     else
     {
         if(n % 2 == 0)                          //?n????,????????????n 
         {
            cout << n << "/2=";
            n = n / 2;
            cout << n << endl;
         }
         else                                    //?n????, ????????????n
         {
             cout << n << "*3+1=";
             n = n * 3 + 1;
             cout << n << endl;
         }
         jiaogu(n);                              //???? 
     }
}
int main()
{
    int n;                                       //n???????? 
    cin >> n;                                    //??n 
    jiaogu(n);                                   //???? 
    return 0;
}
main()
{
      int n,a=3,b=1,c=2,s;
      scanf("%d",&n);
      while(n!=1)
      {
                 if(n%2==1)
                 {
                           s=n*a+b;
                 printf("%d*%d+%d=%d\n",n,a,b,s);
                 }
                 else
                 {
                     s=n/c;
                 printf("%d/%d=%d\n",n,c,s);
                 }
                 n=s;
      }
      printf("End");
      getchar();
      getchar();
}
/*
 * qimofuxi_03.cpp
 *  ???????
 *  Created on: 2010-12-17
 *      Author: william
 */
int operation(int x)
{
	if(x%2==0)
    {
		cout<<x<<"/2="<<x/2<<endl;
		return x/2;
    }
	else
	{
		cout<<x<<"*3+1="<<3*x+1<<endl;
		return 3*x+1;
	}
}
int main()
{
    int x;
    cin>>x;
    for(;x!=1;)
    {
    	x=operation(x);
    }
    cout<<"End";
    return 0;
}
/**
  *file  ????
  *author ???
  *date   12.1
  *function		???????????????????????????3?1??????????2??????
				???????????????????1??????????5????????16?8?4?2?1? 
				??????????????????1???????? 
*/
int main()
{
	int n;
	cin >> n;
	while(n != 1)
	{
		if(n % 2 == 1)
		{
			cout << n << "*3+1=" << (n*3+1) << endl;
			n = n * 3 + 1;
		}
		else
		{
			cout << n << "/2=" << (n/2) << endl;
			n = n / 2;
		}
	}
	cout << "End" << endl;
	return 0;
}
int main()
{int a,b,c,i,j,k;
scanf("%d",&a);
if(a==1)
printf("End"); 
else
{while(a!=1)
{	if(a%2==0)
	{	printf("%d/2=%d\n",a,a/2);
		a=a/2;
	}
	else
	{	printf("%d*3+1=%d\n",a,(a*3+1));
		a=a*3+1;
	}
}
printf("End");
}
return 0;
}
int jiaogu(int q){
	if(q%2!=0){
		printf("%d*3+1=%d\n",q,q*3+1);
		q=q*3+1;
	}
    else	if(q%2==0){
		printf("%d/2=%d\n",q,q/2);
		q=q/2;
	}         
	return q;
}

int main () {
	int i,n;
	scanf("%d",&n);
	if (n!=1){
	for (i=0;;i++){
		n=jiaogu(n);
		if(n==1){
			break;
		}
	}
	}
	printf("End");
	return 0;
}
int cal(int a)          //??????
{
    int res=2;
    if(res!=1&&a!=1)
    {
        if(a%2==0)
        {
            res=a/2;
            cout<<a<<"/2="<<res<<endl;
        }
        else
        {
            res=a*3+1;
            cout<<a<<"*3+1="<<res<<endl;
        }
        if(res!=1)          //?????????
            cal(res);
        else
            cout<<"End";
    }
    if(a==1)
        cout<<"End";
    return 0;
}
int main()
{
    int n;
    cin>>n;
    cal(n);
    return 0;
}
main()
{
int a,b,e;
scanf ("%d",&a);if (a==1) {printf ("End");goto loop_copperhead;}
loop_cobra:
e=a-(int)(a/2)*2;
if (e==0) {printf ("%d/2=%d\n",a,a/2); a=a/2;}
else {b=a*3+1;printf("%d*3+1=%d\n",a,b);a=b;}
if (a!=1) goto loop_cobra; else printf ("End");
loop_copperhead:
return 0;
}
main()
{  
      int a;
      scanf("%d",&a); 
      if(a==1)
      printf("End"); 
      else
      
      
      { for(;;)
     {if(a%2==0)
     {
               printf("%d/2=%d\n",a,a/2);
     a=a/2;
     }
     else 
     if(a==1) 
     {
              printf("End");
              break;
     }
     else 
     {
          printf("%d*3+1=%d\n",a,3*a+1);
     a=3*a+1;
     }
     }
     
     }
     
                         

      }
/*
 * qimolianxi_3.cpp
 * Name:????
 *  Created on: 2010-12-24
 *      Author: ??
 */

void os(int o);
void js(int j) {
	int n = j * 3 + 1;
	cout << j << "*" << 3 << "+" << 1 << "=" << n << endl;
	if(n%2==0) os(n);
	else {
		if(n!=1) js(n);
		else cout<<"End"<<endl;
	}
}
void os(int o) {
	int m = o / 2;
	cout << o << "/" << 2 << "=" << m << endl;
	if(m%2==0) os(m);
	else{
		if(m!=1) js(m);
		else cout<<"End"<<endl;
	}
}
void progress(int t) {
	if(t==1){
		cout<<"End"<<endl;
		return;
	}
	if (t != 1 && t % 2 == 1)
	js(t);
	if (t % 2 == 0)
	os(t);
}
int main() {
	int t;
	cin >> t;
	progress(t);
	return 0;
}
main()
{
      int a;
      scanf("%d",&a);
      while (a>1) {
            if (a%2==0) {
            printf("%d",a);
            a=a/2;
            printf("/2=%d\n",a);
            }
            else {
            printf("%d",a);
            a=a*3+1;
            printf("*3+1=%d\n",a);
            }
            }
      printf("End\n");
            getchar();
            getchar();
            getchar();
            getchar();
            getchar();
}
int main(){
	int n,a=0;
	scanf("%d",&n);
	if(n==1){
	     printf("End");
	}
	else {
	for(int i=0;i<99999;i++){
		   a=n;
	       if(n%2==0){
		          n=n/2;
				  printf("%d/2=%d\n",a,n);
		   }else{
		          n=n*3+1;
				  printf("%d*3+1=%d\n",a,n);
		   }
		   if(n==1){
			   printf("End");
		          break;
		   }
		  
	}}
     return 0;
}
int main()
{
	int change(int);
	int n;
	scanf("%d",&n);
	if(n==1)
		printf("End\n");
	else
	{
		do
		{
			n=change(n);
		}while(n!=1);
		printf("End\n");
	}
	return 0;
}

int change(int n)
{
	int a;
	if(n%2==0)
	{
		a=n/2;
		printf("%d/2=%d\n",n,a);
	}
	else
	{
		a=n*3+1;
		printf("%d*3+1=%d\n",n,a);
	}
	return a;
}
void main()
{
	int n;
	void suan(int a);
	scanf("%d",&n);
    suan(n);
    
}
void suan(int a)
{
	int s;
    if(a==1)
		printf("End");
	else if(a%2==0)
	{
		s=a/2;
		if(s!=1)
		{
			printf("%d/2=%d\n",a,s);
		suan(s);
		}
		else 
		{   printf("%d/2=%d\n",a,s);
		printf("End");}
		
	}
	else if(a%2!=0)
	{
		s=a*3+1;
		printf("%d*3+1=%d\n",a,s);
		suan(s);
	}
}
void fenjie(int n)
{
 if(n==1)
 {printf("End");
 return;}
 int m=0;
 if(n%2==0)
 {m=n>>1; printf("%d/2=%d\n",n,m);}
 else{m=3*n+1;printf("%d*3+1=%d\n",n,m);}
 fenjie(m);
}
int main()
{ 
int n;
cin>>n;
fenjie(n);

   return 0;
    
}
void gujiao(int x)
{
	if(x%2) 
	{
		printf("%d*3+1=%d\n",x,x*3+1);
		x=x*3+1;
	}
	else
	{
		printf("%d/2=%d\n",x,x/2);
		x=x/2;
	}
	if(x==1) printf("End");
	else gujiao(x);
}

int main()
{
	int n,i;
	scanf("%d",&n);
	if(n==1) {printf("End");return 0;}
	else gujiao(n);
	return 0;
}
int main()
{
	int n,j,k;
	long int i;
	scanf("%d",&n);
	for(i=1;i<=10000000;i++)
	{
		if(n==1)
			break;
		else
		{
			if(n%2==0)
			{
				j=n;
				k=j/2;
				printf("%d/2=%d\n",j,k);
				n=k;
			}
			else
			{
				j=n;
				k=j*3+1;
				printf("%d*3+1=%d\n",j,k);
				n=k;
			}
		}
	}
	printf("End\n");
	return 0;
}
/**
 * ? ? ??????.cpp
 * ?    ?????             
 * ?????2010?12?03?    
 * ?????????????????
 */
int f ( int );			//????
int main()
{
	int n;
	cin>>n;
	if ( n == 1 )		//?????1?????End
		cout<<"End"<<endl;
	else 
		for ( int i = 0; i < 1000; i++ )	//???????f
	{
			n = f(n);
			if ( n == 1 )
			{
				cout<<"End"<<endl;			//????????1????End?????
				break;
			}
	}
	return 0;
}
int f ( int n )
{
	if ( n % 2 == 0 )			//??n?????????2???
	{
		cout<<n<<"/"<<2<<"="<<n/2<<endl;
		return n/2;
	}
	else 
	{
		cout<<n<<"*"<<3<<"+"<<1<<"="<<n*3+1<<endl;	//??n?????????3??1???
		return n*3+1;
	}
}
int main()
{
	int n,a;
	scanf("%d",&n);
	if(n==1)
	{
		printf("End");
	}
	else
	{
		while(n!=1)
		{
			if(n%2!=0)
			{
				a=n*3+1;
				printf("%d*3+1=%d\n",n,a);
			}
			else
			{
				a=n/2;
				printf("%d/2=%d\n",n,a);
			}
			n=a;
		}
		printf("End\n");
	}
	return 0;
}
int f(int x)
{
    if(x%2==0)
    {
      printf("%d/2=%d\n",x,x/2);
      return(x/2);
    }
    else
    { 
      printf("%d*3+1=%d\n",x,x*3+1);
      return(x*3+1);
     }
}
int main()
{
  int x;
  scanf("%d",&x);
  while(x!=1)
  {
   x=f(x);
  }
  if(x==1)
   printf("End");;
  return 0;
}
int jiaogu(int n)
{
	if(n==1)
	{
	  printf("End\n");
	  return 0;
	}
	else if(n%2)
	{
	  printf("%d%c%d%c%d%c%d\n",n,42,3,43,1,61,n*3+1);
	  n=n*3+1;
	  jiaogu(n);
	  return 0;
	}
	else
	{
	  printf("%d%c%d%c%d\n",n,47,2,61,n/2);
	  n=n/2;
	  jiaogu(n);
	  return 0;
	}
}

int main()
{
	int n;
	scanf("%d",&n);
	jiaogu(n);
	return 0;
}
int X(int m)//????
{
   if (m%2==0)//?????????
   {
	   cout<<m<<"/2="<<m/2<<endl;
	   m=m/2;
	   if (m==1) //????????1
	   {
		   cout<<"End"<<endl;
	   }
	   else X(m);//????
   }
   else 
   {
	   cout<<m<<"*3+1="<<m*3+1<<endl;
	   m=m*3+1;
	   if (m==1)  
	   {
		   cout<<"End"<<endl;
	   }
	   else X(m);
   }
   return 0;
}
int main()
{
    int n;
	cin>>n;
	cout<<endl;
	if (n==1) cout<<"End"<<endl;//??1?????End
	else X(n);//??????
    return 0;
}
main()
{
      int a,b;
      scanf("%d",&a);
      if(a==1)
      printf("End\n");
      else 
      {for(;a!=1;)
      {
      if(a%2==0)
      {b=a/2;
      printf("%d/2=%d\n",a,b);
      a=b;}
      else 
      {b=3*a+1;
      printf("%d*3+1=%d\n",a,b);
      a=b;}
           }
      printf("End\n");
           }
      
      }
int main()
{
    int a,b,c;
    scanf ("%d",&a);
    if (a==1)
    printf("End");
    else
    {
    do
    {b=a%2;
    if (b==0)
    {
    c=a/2;
    printf ("%d/2=%d\n",a,c);
    a=a/2;
    }
    else 
    {
    c=a*3+1;
    printf ("%d*3+1=%d\n",a,c);
    a=a*3+1;
    }
}

    while (a>1);

    printf("End");
}
    getchar();
    getchar();
}
/**
* ??
* 2010?12?4
* ????
*/
int g_n;   //g_n??????
int jishu(int); //????
int oushu(int); //????
int main ()
{
	cin >> g_n;
	if (g_n == 1)
		cout << "End" << endl;
	else
	{
		for (;g_n != 1;)
		{
			if (g_n % 2 == 0) //?n?= 1?????????????????????
			{
				g_n = oushu(g_n);
			}
			else
				g_n = jishu(g_n);
		}
		cout << "End" << endl;
	}
	return 0;
}
int jishu(int n)  //????????????
{
	cout << n << "*3+1=" << n * 3 + 1 << endl;
	return n * 3 + 1;
}

int oushu(int n)  //????????????
{
	cout << n << "/2=" << n / 2 << endl;
	return n / 2;
}
int main(){
	int i,j,n;
	int sz[100];
	scanf("%d",&n);
	for(i=0;i<100;i++){
		sz[0]=n;
               if(sz[i]==1){
			break;
		}else if(sz[i]%2!=0){
			sz[i+1]=sz[i]*3+1;
		printf("%d*3+1=%d\n",sz[i],sz[i+1]);
		}else if(sz[i]%2==0){
			sz[i+1]=sz[i]/2;
			printf("%d/2=%d\n",sz[i],sz[i+1]);
			}
	}
               printf("End");

		return 0;
}
int main()
{
	int n,m,i,b,a[100]={0};
scanf("%d",&n);
if(n!=1)
{
do{
if (n%2!=0)
{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;
}
}
while(n>1);

printf("End");
}
else

printf("End");

return 0;
}
int main()
{
	int n,m;
	cin>>n;
	if(n!=1)
	{do
	 {
	 if(n%2==0)
	   {m=n/2;
	 cout<<n<<"/2="<<m<<endl;
	 n=m;}
	 else
	{m=n*3+1;
	 cout<<n<<"*3+1="<<m<<endl;
	 n=m;}
	}
	while(n!=1);
	cout<<"End";
	}
	else 
		cout<<"End";
	cin.get();
	cin.get();
	return 0;
 }
int i;
void Kakutan()
{
    while(i!=1)
    {
        if(i%2==1)
        {
            cout<<i<<"*3+1="<<i*3+1<<endl;
            i=i*3+1;
        }
        else
        {
            cout<<i<<"/2="<<i/2<<endl;
            i=i/2;
        }
    }
    if(i==1)cout<<"End"<<endl;
    return;
}
int main()
{
    cin>>i;
    Kakutan();
    return 0;
}
int main()
{
  int a,n[100000],i,p=0;
  scanf("%d",&a);
  n[0]=a;
  if(a==1)
  {
    printf("End");
   }
  else
  {
    for(i=0;n[i]!=1;i++)
    {
      if(n[i]%2!=0)
      {
        n[i+1]=n[i]*3+1;
        if(p==0)
        {
          printf("%d*3+1=%d",n[i],n[i+1]);
          p++;
        }
        else
        {
          printf("\n%d*3+1=%d",n[i],n[i+1]);
        }
      }
      else
      {
        n[i+1]=n[i]/2;
        if(p==0)
        {
          printf("%d/2=%d",n[i],n[i+1]);
          p++;
        }
        else
        {
          printf("\n%d/2=%d",n[i],n[i+1]);
        }
      } 
    }
    printf("\nEnd");
  }
  return 0;
}
void ji(int shu){
	int m;
	m=shu*3+1;
	cout<<shu<<"*3+1="<<m<<endl;
	void ou(int shu);
	if (m%2==1) ji(m);
	else ou(m);
}

void ou(int shu){
	int m;
	m=shu/2;
	cout<<shu<<"/2="<<m<<endl;
	if (m==1) cout<<"End";else
	if (m%2==1) ji(m);
	else ou(m);
}

int main(){
	int n;
	cin>>n;
        if (n==1) cout<<"End";else
	if (n%2==1) ji(n);
	else ou(n);
}
int main(int argc, char* argv[])
{
	int n;
	scanf("%d",&n);
	for (;;)
	{
		if (n==1)
		{
			printf("End\n");
			break;
		}
		else if(n%2==1)
		{
			printf("%d*3+1=%d\n",n,(3*n+1));
			n=3*n+1;
			continue;
		}
		else if (n%2==0)
		{
			printf("%d/2=%d\n",n,(n/2));
			n=n/2;
			continue;
		}
	}
	return 0;
}
main()
{
	int n,m;
	scanf("%d",&n);
	while(1)
	{
	if(n%2==0 && n!=1) 
	{
		m=n/2;
		printf("%d/2=%d\n",n,m);
		n=m;
	}
	if(n%2!=0 && n!=1) 
	{
		m=n*3+1;
		printf("%d*3+1=%d\n",n,m);
		n=m;
	}
	if(n==1) {printf("End");
	          break;
	         }
	}
}
int CalcAndPrint(int x)
{
	int result;
	if (x % 2 == 0)
	{
		result = x / 2;
		cout << x << "/2=" << result << endl;
	}
	else
	{
		result = x * 3 + 1;
		cout << x << "*3+1=" << result << endl;
	}
	return result;
}

int main()
{
	int num;
	for (cin >> num; num != 1; num = CalcAndPrint(num));
	cout << "End";
	return 0;
}
int n;
void js(int n)
{
   printf("%d*3+1=%d\n",n,n*3+1);
   
}
void os(int n)
{
	printf("%d/2=%d\n",n,n/2);
	
}
void main()
{
	scanf("%d",&n);
    while(n!=1)
	{
		if(n%2==1) 
		{
			js(n);
            n=n*3+1;
		}
	else if(n%2==0) 
			{
		    os(n);
			n=n/2;
	}
	}printf("End");

}
void Try(int); 
int main()
{
    int n;
    cin >> n;
    Try (n);
    cout << "End" << endl; 
    return 0;
}
void Try(int i)
{
     while (i != 1)
     {
             if (i % 2 == 0)
             {
                   cout << i << "/2=" << i / 2 << endl;
                   i = i / 2;
             }
             else
             {
                 cout << i  << "*3+1=" << i * 3 + 1<< endl;
                 i = i * 3 + 1;
             }
     }
}
int main()
{
	int n,i=1;

	scanf("%d",&n);

	if(n==1)
		printf("End");
	else{
		while(i){
			if(n%2!=0){
				printf("%d*%d+%d=%d\n",n,3,1,n*3+1);
				n=n*3+1;
			}
			else{
				printf("%d/%d=%d\n",n,2,n/2);
				n=n/2;
				if(n==1)
					i=0;
			}
		}
		printf("End");
	}
	return 0;
}
//****************************************
//*???????                       **
//*????? 1100012762                **
//*???2011.11.15                     **
//****************************************
int f(int n)                                            //????????????????????1????????????
{
	if (n == 1)
	{
		cout << "End" << endl;
		return 0;
	}
	else
	{
		if (n % 2 == 0)
		{
			cout << n << "/2=" << n / 2 << endl;
			n /= 2;
		}
		else
		{
			cout << n << "*3+1=" << n * 3 + 1 << endl;
			n = n * 3 + 1;
		}
		return f(n);
	}
}
int main()
{
	int n;
	cin >> n;
	f(n);
	return 0;
}
void jiao(int n)
{
	int m,k;
	if(n==1)
	{
		printf("End\n");
	}
	if(n!=1)
	{
		if(n%2!=0) 
		{
		    m=n*3+1;
		    printf("%d*3+1=%d\n",n,m);
		    jiao(m);
		}
    	if(n%2==0)
		{
		    k=n/2;
		    printf("%d/2=%d\n",n,k);
		    jiao(k);
		}
	}
}
void main()
{
	int n;
	scanf("%d",&n);
	jiao(n);
}
int main()
{
    int n,i,a;
	scanf("%d",&n);
	
	for(i=1;;i++){
        if(n==1){
		   printf("End\n");
           break;
		}
	  if(n%2==0){
		a=n/2;
		printf("%d/2=%d\n",n,a);
	    if(a==1){
		  printf("End\n");
		  break;
		}
	    else{
		  n=a;
		}
	  }
	   if(n%2!=0){
		  a=n*3+1;
		  printf("%d*3+1=%d\n",n,a);
		if(a==1){
		  printf("End\n");
		  break;
		}
		else{
		n=a;
		}
	  }
	}
	return 0;
}
int suan(int n)
{
	int temp;
	if(n==1)
	{
		printf("End");
	   return 0;
	   }
	if(n%2==1)
	{
		temp=n;
		n=n*3+1;
		printf("%d*3+1=%d\n",temp,n);
		return suan(n);
	}
	if(n%2==0)
	{
		temp=n;
		n=n/2;
		printf("%d/2=%d\n",temp,n);
		return suan(n);
	}
	
}
		


void main()
{
	int n;
	scanf("%d",&n);
	suan(n);
}
int num;

void func(){
  if (num & 1) {
    cout << num << "*3+1=" << num * 3 + 1 << endl;
    num = num * 3 + 1;
  }
  else {
    cout << num << "/2=" << num / 2 << endl;
    num /= 2;
  }
}

int main(){
  cin >> num;
  while (num != 1){
    func();
  }
  cout << "End" << endl;

  return 0;
}