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