#include using namespace std; int main(){ int N, K; cin >> N >> K; for(int d=N-1;d>=1;d--){ if(N % d == 0){ cout << d << endl; break; } } return 0; }