#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int i, j, m, n, c;
  cin >> n >> c;
  int ar[n];
  for (i = 0; i < n; i++) {
    cin >> ar[i];
  }
  long long int l = 1, h = n, mid;
  long long int co = 0, res1 = 0, res2 = 0;
  while (l <= h) {
    co = 0;
    mid = (l + h) / 2;
    vector<long long int> v(n);
    for (i = 0; i < n; i++) {
      v[i] = ar[i] + mid * (i + 1);
    }
    sort(v.begin(), v.end());
    for (i = 0; i < mid; i++) {
      co = co + v[i];
    }
    if (co > c)
      h = mid - 1;
    else if (co <= c)
      l = mid + 1, res1 = co, res2 = mid;
  }
  cout << res2 << " " << res1;
}
