#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, S, x, hi, lo, med, hasil, ans;
  cin >> n >> S;
  vector<pair<long long, long long> > v;
  long long a[n + 2];
  for (int i = 1; i <= n; i++) {
    cin >> x;
    v.push_back({x, i});
  }
  lo = 0, hi = n;
  while (lo <= hi) {
    med = (lo + hi) / 2;
    int j = 0;
    for (auto p : v) {
      a[j] = p.first + med * p.second;
      j++;
    }
    sort(a, a + n);
    hasil = 0;
    for (int i = 0; i < med; i++) {
      hasil += a[i];
    }
    if (hasil > S)
      hi = med - 1;
    else {
      ans = hasil;
      lo = med + 1;
    }
  }
  cout << hi << " " << ans;
}
