
#include<bits/stdc++.h>
using namespace std;
long long n,x;
long long s(long long c){
x=c;
if(x%2==0){
cout<<x<<"/2="<<x/2<<endl;
x=x/2;
return x;
}else{
cout<<x<<"*3+1="<<x*3+1<<endl;
x=x*3+1;
return x;
}
return 0;
}
int main() {
cin>>n;
x=n;
for(int i=1;;i++){
s(x);
if(x==1)break;
}
cout << "End";
return 0;
}