divisor n = [x|x<-[3..n],n`mod`x==0] main=do n<-getLine>>=return.(read::String->Integer) print$head$divisor n