fun main(args:Array) { var N = readLine()!!.toInt() var ans = 0 while(1 < N) { if(N%2 == 1) { N++; ans++; } else{ N /= 2; ans++; } } println(ans) }