#include using namespace std; int main(){ int a,b; cin>>a; for(int i = 2; i <= a; i++) { if (a % i == 0){ b = i; break; } } cout << b; return 0; }