#ifndef MYDEBUG #include #define err(...) #define errs(...) #endif using namespace std; void Calc(); #define ALL(a) begin(a),end(a) #define RALL(a) rbegin(a),rend(a) typedef long long ll; typedef unsigned long long ull; signed main() { cin.tie(0); ios::sync_with_stdio(false); cout << fixed << setprecision(15); cin.exceptions(istream::failbit | istream::badbit); Calc(); cout.flush(); return 0; } struct Scanner { templatestatic A Next() { A a; cin >> a; return a; } static string Line() { string s; getline(cin, s); return s; } template static vector Array(int n) { vector a(n); for (A& i : a) i = Next(); return a; } template static vector Array(int n, A add) { vector a(n); for (A& i : a) i = Next() + add; return a; } static int Int() { return Next(); } template A operator-(const A &a) { return Next() - a; } template Scanner& operator>>(A &a) { a = Next(); return *this; } template operator A() { return Next(); } operator bool() { return !!cin; } }; Scanner in; /*---------------------------------------------------------------------*/ void Calc() { ll x = in; map m; auto xx = sqrt(x); int cnt = 0; for (int i = 2; x != 1 && i <= xx; i++) { cnt++; while (x % i == 0) { x /= i; m[i]++; } } if (x != 1) m[x]++; ll y = 1; for (auto& i : m) { if (i.second % 2) y *= i.first; } cout << y << endl; }