#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
int n;
vector<int> a;
vector<ll> b;
ll check(int x) {
  for (int i = 0; i < n; i++) b[i] = a[i] + (ll)(i + 1) * x;
  sort(b.begin(), b.end());
  ll sum = 0;
  for (int i = 0; i < x; i++) sum += b[i];
  return sum;
}
int b_search(int k) {
  int l = 0, r = n;
  while (l <= r) {
    int x = (r + l) / 2;
    ll c;
    if ((c = check(x)) <= k && (x + 1 > n || check(x + 1) > k))
      return x;
    else {
      if (c < k)
        l = x + 1;
      else
        r = x - 1;
    }
  }
  return -1;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int q = 1;
  while (q--) {
    int k;
    cin >> n >> k;
    a.resize(n);
    b.resize(n);
    for (int i = 0; i < n; i++) cin >> a[i];
    cout << (k = b_search(k)) << " ";
    if (k != -1)
      cout << check(k);
    else
      cout << 0;
    cout << "\n";
  }
}
