#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: p=N print (p)