#include <iostream>
using namespace std;
int main()
{int n,even,odd;
while(n>0);
cout<<"pls enter the value of n\n";
cin>>n;
if (n==1)cout<<"stop\n";
else if (n==even) cout<<"next no is\n"<<n/2;
else if (n==odd)cout<<"the next no is\n<<3*n+1";
else cout<<endl;
}