#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
template <typename T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

#define pb push_back
#define fi first
#define se second
#define int long long
typedef long long ll;
typedef long double ld;
#define PI 3.14159265

// 🍪 DEBUG FUNCTIONS START
#define cerr cout
void __print(int x) {cerr << x;}
void __print(double x) {cerr << x;}
void __print(long double x) {cerr << x;}
void __print(char x) {cerr << '\'' << x << '\'';}
void __print(const char *x) {cerr << '\"' << x << '\"';}
void __print(const string &x) {cerr << '\"' << x << '\"';}
void __print(bool x) {cerr << (x ? "true" : "false");}
template<typename T, typename V>
void __print(const pair<T, V> &x) {cerr << '{'; __print(x.first); cerr << ','; __print(x.second); cerr << '}';}
template<typename T>
void __print(const T &x) {int f = 0; cerr << '{'; for (auto &i: x) cerr << (f++ ? "," : ""), __print(i); cerr << "}";}
void _print() {cerr << "\n";}
template <typename T, typename... V>
void _print(T t, V... v) {__print(t); if (sizeof...(v)) cerr << ", "; _print(v...);}
#ifndef ONLINE_JUDGE
//#define deb(x...) cerr << "[" << #x << "] = "; _print(x)
#define deb(x...)  _print(x)
#else
#define deb(x...)
#endif
// 🍪 DEBUG FUNCTIONS END


const int mod = 1e9 + 7;
const int inf = 0x3f3f3f3f;
const ll infl = 0x3f3f3f3f3f3f3f3fLL;


void solve()
{
    int n, k;
    cin >> n >> k;
    int ans = 0;
    for(int i = 1; i <= n; i++){
        for(int j = 1; j <= k; j++){
            int sum = i * 100 + j;
            ans += sum;
        }
    }
    cout << ans << "\n";
}
signed main()
{
    ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    srand(chrono::high_resolution_clock::now().time_since_epoch().count());
    int t;
    t=1;
    while(t--)
    {
      solve();
    }
}
#include <bits/stdc++.h>
//#include <bits/extc++.h>
//#include <immintrin.h>

using namespace std;

//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native")
//#pragma GCC optimize("O3")
//#pragma GCC optimize("unroll-loops")


template<typename T>
istream &operator>>(istream &in, vector<T> &a) {
    for (auto &i : a)
        in >> i;
    return in;
}

template<typename T>
ostream &operator<<(ostream &out, const vector<T> &a) {
    for (auto &i : a) {
        out << i << " ";
    }
    return out;
}

template<typename T, typename D>
istream &operator>>(istream &in, pair<T, D> &a) {
    in >> a.first >> a.second;
    return in;
}

template<typename T, typename D>
ostream &operator<<(ostream &out, const pair<T, D> &a) {
    out << a.first << " " << a.second;
    return out;
}

struct LogOutput {
    template<typename T>
    LogOutput &operator<<(const T &x) {
#ifdef DIVAN
        cout << x;
#endif
        return *this;
    }
} dout, fout;

typedef long long ll;
typedef unsigned long long ull;
typedef double dl;
typedef complex<double> cd;

#define nl '\n'
#define elif else if
#define all(_v) _v.begin(), _v.end()
#define rall(v) v.rbegin(), v.rend()
#define sz(v) (int)(v.size())
#define sqr(_v) ((_v) * (_v))
#define vpi vector<pair<int, int>>
#define eb emplace_back
#define pb push_back
#define mod(x, m) ((x) >= 0 ? ((x) % m) : ((((x) % m) + m) % m))
#define vi vector<int>
#define pi pair<int, int>
#define ti tuple<int, int, int>
#define minq(x, y) x = min((x), (y))
#define maxq(x, y) x = max(x, (y))
#define forn(i, n) for (int i = 0; i < (n); ++i)

const ll INFL = 9187201950435737471;
const ll nINFL = -9187201950435737472;
const int INF = 2139062143;
const int nINF = -2139062144;
const ull ULINF = numeric_limits<ull>::max();
const long double PI = acos(-1);
auto seed = chrono::high_resolution_clock::now().time_since_epoch().count();
mt19937 rnd(0);

inline void IO() {
#ifdef DIVAN
    freopen("../input.txt", "r", stdin);
    freopen("../output.txt", "w", stdout);
#else
    //    freopen("input.txt", "r", stdin);
//    freopen("output.txt", "w", stdout);
    ios_base::sync_with_stdio(0);
    cin.tie(0);
#endif
}

#define int ll

const int MAXN = 3e6 + 100;

int sum2[MAXN], pSum2[MAXN], sum3[MAXN];

void Solve() {
    int n, k;
    cin >> n >> k;
    for (int a = 1; a <= n; ++a) {
        sum2[a + 1]++;
        sum2[a + n + 1]--;
    }
    int res = 0;
    for (int i = 2; i < MAXN; ++i) {
        res += sum2[i];
        sum2[i] = res;
    }
    for (int i = 1; i < MAXN; ++i) {
        pSum2[i] = pSum2[i - 1] + sum2[i];
    }
    for (int i = 3; i <= 3 * n; ++i) {
        int l = max(2ll, i - n), r = min(2 * n, i - 1);
        assert(l <= r);
        sum3[i] = pSum2[r] - pSum2[l - 1];
    }
    int needSum = 3;
    while(k > sum3[needSum]) {
        k -= sum3[needSum];
        needSum++;
    }
    int a = 1;
    while(k > sum2[needSum - a]) {
        k -= sum2[needSum - a];
        ++a;
    }
    for (int b = 1; b <= n; ++b) {
        int c = needSum - a - b;
        if (c > n) {continue;}
        if (k == 1) {
            cout << a << ' ' << b << ' ' << c;
            return;
        }
        --k;
    }
}

signed main() {
    IO();
    int t = 1;
//    cin >> t;
    int startTime = clock();
    for (int i = 1; i <= t; ++i) {
//        cout << "Case #" << i << ": ";
        Solve();
    }
    int endTime = clock();
    fout << '\n' << "Time: " << (endTime - startTime + 999) / 1000;
    return 0;
}
