# your code goes here #import math N=int(input()) #Sq=math.sqrt(float (N)) i=3 p=3 while N%i!=0 and i*i<=N: i+=1 p=i if i*i>N: if N%2==0 and N>4: p=N//2 else: p=N print (p)