#include "bits/stdc++.h" using namespace std; #define print(x) cout< PI; typedef pair V; typedef vector VE; const ll mod = 1000000007; int is_prime(ll n){ for(ll i=3;i*i<=n;i++){ if(n%i==0)return i; } return 0; } int main() { ll n; cin>>n; ll ans=is_prime(n); if(!ans){ if(!n%2){print(n%2);} else print(n); } else { print(ans); } }