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