# -*- coding: utf-8 -*- X = int(input()) # Xを素因数分解する primes = {} i = 2 while i*i<=X: while X>=i and X%i==0: X //= i if i in primes: primes[i] += 1 else: primes[i] = 1 i += 1 Y = 1 if len(primes) == 0: Y = X else: for key in primes: if primes[key]%2 == 1: Y *= key Y *= X print(Y)