#include <bits/stdc++.h>
int main(void) {
  int i, j, k;
  int l = 1;
  int C[2000];
  printf("2\n");
  C[0] = 2;
  for (i = 3; i <= 10000; i += 2) {
    k = 0;
    for (j = 3; j <= sqrt(i); j += 2) {
      if (i % j == 0) {
        k = 1;
        break;
      }
    }
    if (k == 0) {
      printf("%d\n", i);
      C[l] = i;
      l = l + 1;
    }
  }
  printf("total %d\n", l - 1);
  printf("\n");
  return 0;
}
