#include using namespace std; int main() { int N, i; cin >> N; for (i = 2; i < N; ++i) { if (N % i == 0) break; } cout << N / i; }