#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, s;
  cin >> n >> s;
  vector<long long> o(n);
  for (int i = 0; i < n; i++) {
    cin >> o[i];
  }
  int lo = 0;
  int hi = n;
  long long sum2 = 0;
  while (lo < hi) {
    long long med = (lo + hi + 1) / 2;
    vector<long long> t(n);
    for (int i = 0; i < n; i++) t[i] = o[i] + med * (i + 1);
    sort(t.begin(), t.end());
    long long sum = 0;
    for (int i = 0; i < med; i++) sum += t[i];
    if (sum > s) {
      hi = med - 1;
    } else {
      sum2 = sum;
      lo = med;
    }
  }
  cout << lo << " " << sum2 << endl;
}
