using System; namespace No312 { class MainClass { public static void Main (string[] args) { long n = Convert.ToInt64 (Console.ReadLine ()); for (long i = 3; i * i <= n; i++) { if (n % i == 0) { Console.WriteLine (i.ToString ()); return; } } Console.WriteLine (n.ToString ()); } } }