#include<iostream>
#include<math.h>
using namespace std;

int main()
{
	long long x, y = 1, n = 0, i;
	cin >> x;
	while (x % 2 == 0) {
		x /= 2;
		n++;
	}
	if (n % 2 != 0) {
		y *= 2;
	}
	for (i = 3; i <= sqrt(x); i += 2) {
		n = 0;
		while (x % i == 0) {
			x /= i;
			n++;
		}
		if (n % 2 != 0) {
			y *= i;
		}
	}
	y *= x;
	cout << y << endl;
	return 0;
}