import math N=int(input()) Sq=math.sqrt(float (N)) i=3 while N%i!=0: i+=1 print (i)