#include using namespace std; using ll = long long; int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); int ans = 1; int n,k; cin>>n>>k; for(int i = 1;i<=n;i++){ if(n%i!=0) continue; if((long)i*2<=n) ans = i; } cout<