#include using namespace std; typedef long long ll; typedef vector VI; typedef vector VVI; #define REP(i, n) for(int(i)=0;(i)<(n);++(i)) const int MOD = int(1e9+7); ll N,K; int main(){ cin >> N >> K; for(int i = 2; i < N; i++){ if(N % i == 0){ cout << N/i << endl; return 0; } } cout << 1 << endl; return 0; }