#include <bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
#define For(i, a, b) for (ll i = (a); i <= (b); i++)
#define Forx(i, a, b, x) for (ll i = (a); i <= (b); i+=x)
#define debug(x) cout <<" || "<< #x << " is= " << x <<endl; //use for debug
#define read(a) ll a; cin >> a;
#define Ford(i, a, b) for (ll i = (a); i >= (b); i--)
#define pb(a) push_back(a)
#define pf(a) push_front(a)
#define fast_io ios_base::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL)
#define ll long long int
#define vi         vector<int>
#define vll        vector<ll>
#define vpii       vector<pair<int,int>>
#define pr         pair<ll,ll>
#define vpll       vector<pair<ll,ll>>
#define all(v)     v.begin(),v.end()
#define rall(v)    v.rbegin(),v.rend()  //reverse of above;
#define sz(container) int((container).size())
#define cut(x) {cout<<x<<"\n"; continue;}
#define setprec(x) cout << fixed << showpoint << setprecision(15)<<x<<"\n";
#define time cout << clock() / double(CLOCKS_PER_SEC) << endl;
#define endl '\n';
#define mod  1000000007
#define mod1 998244353
#define pi 3.141592653589793238
#define fi first
#define se second
using namespace std;
using namespace __gnu_pbds;
typedef tree<pr,null_type,less<pr>,rb_tree_tag,tree_order_statistics_node_update> ordered_set; 

//░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

//*s.find_by_order() ->returns an iterator to the k-th largest element (counting from zero);
//s.order_of_key() ->number of elements strictly smaller then our item;
//st.rbegin()->second; last element in set
//st.erase(prev(st.end())); delete last element in set;
//sort(a+1,a+n+1,[](ll x,ll y){return abs(x)>abs(y);});
//sort(v.begin(), v.end(), greater<int>()); -> not sure work for first also if second are equal;
//q=lower_bound(all(v[a[i]]),i)-v[a[i]].begin()+1;
// s.substr(start_ind,length);
// vpll shift={{-1,-1},{-1,0},{-1,1},{0,-1},{0,1},{1,-1},{1,0},{1,1}} ->shift operator;
//bool comp(pr a,pr b){return a.second<b.second;} // use for differentiate order of comparision;
// cntbit(x) __builtin_popcount(x); -> no. of bits in given no.;
// true false; memset(dp,-1,sizeof(dp));
// std::random_shuffle(all(vec));

//░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
const ll MAXN=1e4+5;
const ll inf=1e18;

int main()
{
  fast_io;
  //“Don’t wish it were easier. Wish you were better.” – Jim Rohn;
  #ifndef ONLINE_JUDGE
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
  #endif
  ll n,k; cin>>n>>k;
  ll dp[4][3*n+5];
  memset(dp,0,sizeof(dp));
  dp[0][0]=1;
  // dp[i][j]=valid ways of sum j by choosing i no's. from 1 to n;
  For(j,1,3*n) dp[0][j]+=dp[0][j-1];
  For(i,1,3)
  {
    For(j,1,3*n)
    {
      dp[i][j]=dp[i-1][j-1];
      if(j>n) dp[i][j]-=dp[i-1][j-n-1]; // as limit is n;
    }
    For(j,1,3*n) dp[i][j]+=dp[i][j-1];
  }
  
  // now we can fix sum for given k;
  ll sum;
  For(i,1,3*n) if(dp[3][i]>=k)
  {
    sum=i;
    break;
  }
  ll a,b,c;
  ll rem=k-dp[3][sum-1];
  For(value,1,n) // now fixing  beauty find rem.;
  {
    ll p=dp[2][sum-value]-dp[2][sum-value-1];
    if(p<rem) rem-=p;
    else
    {
      a=value;
      b=1,c=sum-value-1;
      while(c>n) c--,b++;
      rem--;
      while(rem--)
      {
        b++;
        c--;
      }
      break;
    }
  }
  cout<<a<<' '<<b<<' '<<c;
 }
#pragma comment (linker, "/STACK:256000000")
#define  _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <algorithm>
#include <utility>
#include <functional>
#include <cstring>
#include <queue>
#include <stack>
#include <math.h>
#include <iterator>
#include <vector>
#include <string>
#include <set>
#include <math.h>
#include <iostream>
#include <random>
#include<map>
#include <iomanip>
#include <time.h>
#include <stdlib.h>
#include <list>
#include <typeinfo>
#include <list>
#include <set>
#include <cassert>
#include<fstream>
#include <unordered_map>
#include <unordered_set>
#include <cstdlib>
#include <complex>
#include <cctype>
#include <bitset>

using namespace std;
typedef string::const_iterator State;
const long double Ma_PI = 3.1415926535897932384626433832795028841971L;
#define eps 1e-7
#define LONG_INF 2000000000000000000LL
#define GOLD 1.61803398874989484820458
#define MAX_MOD 1000000007LL
#define GYAKU 500000004LL

#define MOD 998244353LL
#define seg_size 262144*2
#define pb push_back
#define mp make_pair
typedef long long ll;
#define REP(a,b) for(long long a = 0;a < b;++a)
#define ALL(x) (x).begin(),(x).end()
void init() {
    iostream::sync_with_stdio(false);
    cout << fixed << setprecision(20);
}
unsigned long xor128() {
    static unsigned long x = 123456789, y = 362436069, z = 521288629, w = 88675123;
    unsigned long t = (x ^ (x << 11));
    x = y; y = z; z = w;
    return (w = (w ^ (w >> 19)) ^ (t ^ (t >> 8)));
}
typedef struct BigInt{
    string s = "0";
    BigInt operator +(BigInt obj) {
        string c;
        while (max(obj.s.length(), this->s.length()) + 1 > c.length()) {
            c.pb('0');
        }
        for (int q = 0; q < obj.s.length(); ++q) {
            c[c.length() - 1 - q] = obj.s[obj.s.length() - q - 1];
        }
        for (int q = 0; q < this->s.length(); ++q) {
            c[c.length() - 1 - q] += this->s[this->s.length() - 1 - q] - '0';
            if (c[c.length() - 1 - q] > '9') {
                c[c.length() - 2 - q]++;
                c[c.length() - 1 - q] -= 10;
            }
        }
        if (c.front() == '0') {
            c.erase(c.begin());
        }
        return BigInt{ c };
    }
    BigInt operator *(BigInt obj) {
        BigInt ans;
        for (int i = this->s.length() - 1; i >= 0; --i) {
            REP(q, this -> s[i] - '0') {
                ans = ans + obj;
            }
            obj.s.pb('0');
        }
        return ans;
    }
}BigInt;

void solve() {
    int n, k, m;
    cin >> n >> k >> m;
    int a = 0;
    REP(i, n - 1) {
        int b;
        cin >> b;
        a += b;
    }
    a = (n) * m - a;
    a = max(a, 0);
    if (a > k) {
        cout << -1 << endl;
    }
    else {
        cout << a << endl;
    }
}

int main() {
    init();
    solve();
}