#include <iostream> #include <cmath> using namespace std; int main(){ int n,p=2,i=0; cin>>n; while(n!=1){ while(n%p==0){ n=n/p; if(p>i) i=p; } p++; } cout<<i; return 0; }