#include using namespace std; using ll = long long; int main(){ ll n; cin >> n; if(__builtin_popcount(n) == 1){ cout << 1 << endl; return 0; } if(n % 2 == 0){ cout << 3 << endl; return 0; } if(n % 2 == 1){ cout << 2 << endl; return 0; } }