#include #include #include #include #include #include using namespace std; typedef long long ll; #define SORT(x) sort((x).begin(), (x).end()) #define RSORT(x) sort((x).begin(), (x).end(), greater() ) int main() { ll x; cin >> x; for (ll y = 1; ; y++) { if (y * y % x == 0) { cout << y * y / x << endl; break; } } return 0; }