from collections import defaultdict x=int(input()) t=x dic=defaultdict(int) for i in range(2,int(x**0.5) + 1): while t%i == 0: dic[i] += 1 t//=i if t != 1: dic[t] += 1 ans = 1 for i,j in dic.items(): if j%2!=0: ans *= i print(ans)