#include using namespace std; int main(){ int N; cin >> N; cout << (__builtin_popcount(N) == 1 ? 1 : 3 - N % 2) << '\n'; }