def GCD(x,y):
	if x == 0:
		return y
	return GCD(y%x , x)

def LCM(x,y):
	return x*y/GCD(x,y)			

X = int(input())
i = 1
while i**2 <= X:
	if X%i == 0:
		# if np.lcm(i,X/i) == X :
		if LCM(i,X/i) == X:
			result = X/i
	i+=1
print(result)	