#include <stdio.h>
#include <iostream>
#include <math.h>
using namespace std;

bool ktnt(long long x)
{
    if (x < 2)
    {
        return 0;
    }
    if (x == 2)
    {
        return 1;
    }
    if (x % 2 == 0)
    {
        return 0;
    }
    long long t;
    for (t = 3 ; t <= (long long) sqrt(x) ; t += 2)
    {
        if (x % t == 0)
        {
            return 0;
        }
    }
    return 1;
}

int main()
{
#ifndef ONLINE_JUDGE
   freopen ("TIMSO.INP", "r", stdin);
   freopen ("TIMSO.OUT", "w", stdout);
#endif
   long long n,dem = 0,temp = 2;
   scanf("%ld",&n);
   while (dem != n)
   {
       if (ktnt(temp) == 1)
       {
           printf("%ld",temp);
           dem++;
       }
       temp++;
   }
   return 0;
}