#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define ll long long #define INF (1 << 30) #define INFLL (1LL << 60) int main() { ll n; bool flag = true; cin >> n; for(ll i = 3;i <= n / 2;i++){ if(n % i == 0){ cout << i << endl; flag = false; break; } } if(flag) cout << n << endl; return 0; }