package No1058; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Collections; import java.util.NoSuchElementException; public class Main { static FastScanner in = new FastScanner(System.in); static PrintWriter out = new PrintWriter(System.out); public static void main(String[] args) { int N = in.nextInt(); ArrayList sutekiList = sutekiList(primeList()); out.println(sutekiList.get(N-1)); out.close(); } static long[] primeList() { int number = 100001; int count = 0; long[] result = new long[10]; while(true) { if(isPrime(number)) { result[count] = number; count++; if(count >= 10) break; } number++; } return result; } static ArrayList sutekiList(long[] primeList) { ArrayList result = new ArrayList<>(); result.add(1L); for(int i=0; i Integer.MAX_VALUE) throw new NumberFormatException(); return (int) nl; } public double nextDouble() { return Double.parseDouble(next()); } } }