//   *    Author :   Debapriya010   :  DEBAPRIYA CHANDRA     
//   *    Jalpaiguri  Government  Engineering  College
 
#include<algorithm>
#include<bits/stdc++.h>
#define ll  long long int
#define dbl long double
#define loop(i,n) for(int i=0;i<n;i++)
#define test(t) int t;cin>>t;while(t--)
#define debo ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL)
#define vi vector<ll>
#define sz size()
#define iss is_sorted
#define bs binary_search
#define mod 1000000007
#define c1_Bin  __builtin_popcountll
#define yos cout<<"YES"<<endl
#define nos cout<<"NO"<<endl
#define pb push_back
#define mp map<ll,ll>
#define fmax(v) *max_element(v.begin(),v.end())
#define fmin(v) *min_element(v.begin(),v.end())
#define tos to_string
using namespace std;
 
bool isPrime(ll  n)
{
    if (n <= 1) return false;
    if (n <= 3) return true;
    if (n % 2 == 0 || n % 3 == 0) return false;
    for (int i = 5; i * i <= n; i = i + 6)
        if (n % i == 0 || n % (i + 2) == 0)
            return false;
    return true;
}
bool IsPalindrome( string  str)
{
    if (str.empty())
        return false;
 
    ll i = 0;                // first characters
    ll j = str.length() - 1; // last character
 
    while (i < j)
    {
        if (str[i] != str[j])
        {
            return false;
        }
        i++;
        j--;
    }
    return true;
}
// Binary Exponentiation fun to calculate pow in 0(logN)
ll binpow(ll a, ll b) {
    if (b == 0)
        return 1;
    ll res = binpow(a, b / 2);
    if (b % 2)
        return (res * res * a)%mod;
    else
        return (res * res)%mod;
}

 signed main(){
     debo;
    // test(t){
     ll k;
     cin>>k;
     ll a=0,g=-1;
     for(ll i=0;i<=k;i++)
     {
         a+=i;
         if(a>=k)
         {
             g=i;
             break;
         }
     }
     cout<<g;



  //   }
     return 0;
 }


 
#include <bits/stdc++.h>
using namespace std;

#define ll long long
#define rep(i, n) for (ll i = 0; i < n; ++i)
#define rep_up(i, a, n) for (ll i = a; i < n; ++i)
#define rep_down(i, a, n) for (ll i = a; i >= n; --i)
#define P pair<ll, ll>

#define all(v) v.begin(), v.end()
#define fi first
#define se second
#define vvvll vector<vector<vector<ll>>>
#define vvll vector<vector<ll>>
#define vll vector<ll>
#define pqll priority_queue<ll>
#define pqllg priority_queue<ll, vector<ll>, greater<ll>>

constexpr ll INF = (1ll << 60);
constexpr ll mod = 1000000007;
constexpr double pi = 3.14159265358979323846;
template <typename T>
inline bool chmax(T &a, T b) {
    if (a < b) {
        a = b;
        return 1;
    }
    return 0;
}
template <typename T>
inline bool chmin(T &a, T b) {
    if (a > b) {
        a = b;
        return 1;
    }
    return 0;
}
ll mypow(ll a, ll n) {
    ll ret = 1;
    rep(i, n) {
        if (ret > (ll)(1e18 + 10) / a) return -1;
        ret *= a;
    }
    return ret;
}
long long modpow(long long a, long long n, long long mod) {
    long long res = 1;
    while (n > 0) {
        if (n & 1) res = res * a % mod;
        a = a * a % mod;
        n >>= 1;
    }
    return res;
}

int main(){
    int n;
    cin >> n;
    set<int> s;
    s.insert(6);
    s.insert(10);
    s.insert(15);
    for(int x = 6; x <= 10000; x += 6){
        if(s.size()==n)break;
        s.insert(x);
    }
    for(int x = 10; x <= 10000; x += 10){
        if(s.size()==n)break;
        s.insert(x);
    }
    for(int x = 15; x <= 10000; x += 15){
        if(s.size()==n)break;
        s.insert(x);
    }
    for(auto e : s)cout << e << " ";
    cout << endl;
    return 0;
}