#include typedef long long ll; using namespace std; int INF = 1e9; int MOD = 1e9+7; main(){ int A,B,max = 1; cin >> A >> B; for(int i = 2;i <= 100000;i++){ if(A % i == 0){ max = A / i; break; } } cout << max << endl; }