import java.util.*; import java.io.*; public class Main{ static final Reader sc = new Reader(); static final PrintWriter out = new PrintWriter(System.out,false); public static void main(String[] args) throws Exception { long n = sc.nextLong(); int t = (int)Math.sqrt(n); boolean[] table = new boolean[t+10]; Arrays.fill(table,true); table[0] = false; for(int i=2;i