package yukicoder; import java.util.Scanner; public class N192 { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); for(int i = n - 100;i <= n + 100;++i){ for(int j = 2; j < i; ++j){ if(i % j == 0){ System.out.println(i); return; } } } } }