#include using namespace std; int main(void) { cin.tie(0); ios::sync_with_stdio(false); long long int n; cin >> n; int res = 0; while(1) { if(n%2==0) { n/=2; } else { n = 3*n + 1; } res += 1; if(n==1) break; } cout << res << '\n'; return 0; }