#include<bits/stdc++.h> using namespace std; int n; int main() { cin >> n; for(int i = 2;i <= n;i++) { for(int j = 2;j <= sqrt(n);j++) { if(i % j == 0 && i != j) continue; else if(n % i == 0) { cout << n / i; return 0; } } } return 0; }