// yukicoder: No.642 Two Operations No.1 // 2019.4.14 bal4u #include int main() { int N, ans; scanf("%d", &N); ans = 0; while (N > 1) { if (N & 1) N++, ans++; N >>= 1, ans++; } printf("%d\n", ans); return 0; }