#ifdef LOCAL #include #else #pragma GCC optimize("O3,unroll-loops") #pragma GCC target("avx2") #include #define debug(...) (static_cast(0)) #define postprocess() (static_cast(0)) #endif // #include "atcoder/dsu.hpp" // #include "atcoder/modint.hpp" // using mint = atcoder::modint998244353; // using mint = atcoder::modint1000000007; using namespace std; using ll = long long; using ld = long double; ll solve2(ll N) { for (ll k = 0; k <= 30; k++) { if (N == (1 << k)) return 1; } if (N % 2) return 2; return 3; } void solve([[maybe_unused]] int test) { ll N; cin >> N; cout << solve2(N) << endl; } int main() { ios::sync_with_stdio(false), cin.tie(nullptr); int t = 1; // cin >> t; for (int _t = 1; _t <= t; _t++) solve(_t); postprocess(); }