#include<iostream> using namespace std;int main() { int i=0,n; cin>>n; while(n!=1) { if(n&1) n=3*n+1; n/=2; i++; } cout<<i<<endl; return 0; }