#include int main() { int n; scanf("%d", &n); int ans = 0; while (n > 1) { ans++; if (n % 2 > 0) n++; else n /= 2; } printf("%d\n", ans); return 0; }