#include <bits/stdc++.h>
using namespace std;
int main() {
  bool prime[10000000];
  for (int i = 0; i < 10000000; i++) {
    prime[i] = 1;
  }
  prime[0] = prime[1] = 0;
  for (int i = 0; i * i < 10000000; i++) {
    if (prime[i] == 1) {
      for (int j = i * 2; j < 10000000; j = j + i) {
        prime[j] = 0;
      }
    }
  }
  int primelist[10000000];
  int j = 0;
  for (int i = 0; i < 10000000; i++) {
    if (prime[i] == 1) {
      primelist[j] = i;
      j++;
      if (j > 10000000 - 1) {
        break;
      }
    }
  }
  return 0;
}
