// 提出時にassertはオフ #ifndef DEBUG #ifndef NDEBUG #define NDEBUG #endif #endif #include using namespace std; using ll = long long; #define ALL(x) (x).begin(), (x).end() template using vec = vector; int N; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); cin >> N; if((N & (- N)) == N){ cout << 1 << "\n"; } else if(N % 2 == 0) { cout << 3 << "\n"; } else { cout << 2 << "\n"; } }