#include using namespace std; using Int = long long; template inline void chmin(T1 &a,T2 b){if(a>b) a=b;} template inline void chmax(T1 &a,T2 b){if(a>n; Int c=0,r=1; while(n!=1){ c++; chmax(r,n); if(n&1) n=n*3+1; else n>>=1; } cout<