#include <bits/stdc++.h>
int main() {
  int n;
  int cnt = 0;
  std::cin >> n;
  int A[n];
  for (int i = 0; i < n; i++) {
    A[i] = i + 2;
    std::cout << A[i] << "\n";
  }
  int judge = 0;
  for (int i = 0; i < n; i++) {
    if (sqrt(A[i]) >= 2) {
      for (int j = 2; j <= sqrt(A[i]); j++) {
        if (A[i] % j == 0) {
          judge = 1;
          break;
        }
      }
      if (judge == 1) {
        cnt += 1;
        judge = 0;
      }
    }
  }
  int ans = n - cnt;
  std::cout << ans;
  return 0;
}
