#include <bits/stdc++.h>
using namespace std;
long long valid(long long m, long long arr[], long long n) {
  long long s = 0;
  long long b[n];
  for (long long i = 0; i < n; i++) {
    b[i] = (arr[i] + (i + 1) * m);
  }
  sort(b, b + n);
  for (long long i = 0; i < m; i++) {
    s = s + b[i];
  }
  return s;
}
int main() {
  long long n;
  cin >> n;
  long long S;
  cin >> S;
  long long arr[n];
  for (long long i = 0; i < n; i++) {
    cin >> arr[i];
  }
  long long l = 0;
  long long h = n;
  long long res = 0;
  long long fac = 0;
  while (l <= h) {
    long long mid = h + (l - h) / 2;
    long long g = valid(mid, arr, n);
    if (g <= S) {
      res = mid;
      fac = g;
      l = mid + 1;
    } else {
      h = mid - 1;
    }
  }
  cout << res << " " << fac << endl;
  return 0;
}
