#include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; const ll INF=1LL<<60; typedef pair P; typedef pair PP; const ll MOD=998244353; const double PI=acos(-1); int main(){ int N; cin>>N; int n=N; while(n%2==0){ n/=2; } int ans=4; if(n==1){ //nが2のべき ans=1; }else{ //nが2のべきでない if(N%2==1){ ans=2; }else{ //N%2==0 ans=3; } } cout<