#pragma GCC optimize("O3")
#include <bits/stdc++.h>
using namespace std;

#define N 200100
#define MOD 1000000007  //998244353
#define ll long long
#define rep(i, n) for(int i = 0; i < n; ++i)
#define rep2(i, a, b) for(int i = a; i <= b; ++i)
#define rep3(i, a, b) for(int i = a; i >= b; --i)
#define eb emplace_back
#define pb push_back
#define all(c) (c).begin(), (c).end()
#define vi vector<int>
#define pii pair<int,int>
#define pll pair<ll,ll>
struct Setup_io {
	Setup_io() {
		ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
		cout << fixed << setprecision(15);
	}
} setup_io;



int main() {
	vi a;
	int n,nn;
	cin >> n;
    nn=n;
	n -= 3;
	a.pb(6);
	a.pb(10);
	a.pb(15);
	if (n > 0)a.pb(12);
	n--;
	rep2(i, 16, 10000) {
		if (n <= 0)break;
		if (i % 6 == 0) {
			a.pb(i);
			n--;
		}
		else if (i % 10 == 0) {
			a.pb(i);
			n--;
		}
		else if (i % 15 == 0) {
			a.pb(i);
			n--;
		}
	}
	//cout << a.size() << endl;
	rep(i, nn - 1)cout << a[i] << " ";
	cout << a[nn - 1] << endl;
	return 0;
}

#include "bits/stdc++.h"
#define rep(i,b) for(ll i=0;i<b;i++)
#define ll long long
#define mp make_pair
#define pb push_back
using namespace std;
/*--Input//////////////////////////////////////////////////*/
inline void IN(void){return;}
template <typename First, typename... Rest>
void IN(First& first, Rest&... rest){
    cin >> first;
    IN(rest...);
    return;
}
#define SS(T, ...)      T __VA_ARGS__; IN(__VA_ARGS__);
#define SV(type,c,n) vector<type> c(n);for(auto& i:c)cin >> i;
/*--Output/////////////////////////////////////////////////*/
#define Yes(n) cout << ((n) ? "Yes" : "No"  ) << endl
#define First(n) cout << ((n) ? "First" : "Second"  ) << endl
inline int p(void){cout << endl; return 0;}
template<class Head> int p(Head&& head){cout << head;p();return 0;} template<class Head,class... Tail> int p(Head&& head,Tail&&... tail){cout<<head<<" ";p(forward<Tail>(tail)...);return 0;}
struct ProconInit {
    static constexpr int IOS_PREC = 15;
    static constexpr bool AUTOFLUSH = false;

    ProconInit() {
        cin.tie(nullptr);
        ios::sync_with_stdio(false);
        cout << fixed << setprecision(IOS_PREC);
        if(AUTOFLUSH)
            cout << unitbuf;
    }
} PROCON_INIT;

#define vl vector<ll>
#define debug(x) cerr<<#x<<" "<<x<<'\n';
#define all(x) (x).begin(),(x).end()

template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
bool cmp(pair<ll,ll> a, pair<ll,ll> b) { return a.second < b.second; }

int main(){
    SS(ll,N,K)
    ll ans=0;
    ll ans2=0;
    ll R,L;
    for(R=2;R<=2*N;R++){
        L=R-K;
        if(L>=2&&L<=2*N){
            //cout<<R<<" "<<L<<endl;
            ll tempL,tempR;
            if(L==2*N)tempL=1;
            else tempL=L-1;
            if(tempL>N)tempL-=(tempL-N)*2;
            
            if(R==2*N)tempR=1;
            else tempR=R-1;
            if(tempR>N)tempR-=(tempR-N)*2;
            
            ans+=tempR*tempL;
        }
    }
    p(ans);
}
