#include <iostream>
using namespace std;


int minim_divisor_quadrat(int n);


int main() {
  int n;
  while (cin >> n) cout << minim_divisor_quadrat(n) << endl;
}
