#include using namespace std; int main() { long long N; cin >> N; if(N & 1) { cout << 2 << endl; } else { while(N % 2 == 0) N /= 2; if(N != 1) cout << 3 << endl; else cout << 1 << endl; } }