#include <bits/stdc++.h>
using namespace std;
long long n, s;
long long a[100005];
long long sum[100006];
long long b[100005];
long long cal(long long k) {
  for (long long i = 1; i <= n; i++) {
    b[i] = a[i] + i * k;
  }
  sort(b + 1, b + 1 + n);
  long long suz = 0;
  for (long long i = 1; i <= k; i++) {
    suz += b[i];
  }
  return suz;
}
int main() {
  cin >> n >> s;
  for (long long i = 1; i <= n; i++) {
    cin >> a[i];
    sum[i] = sum[i - 1] + a[i];
  }
  long long l = 1, r = n;
  long long res1 = 0, res2 = 0;
  while (l <= r) {
    long long mid = (l + r) / 2;
    if (cal(mid) <= s) {
      res1 = mid, res2 = cal(mid);
      l = mid + 1;
    } else
      r = mid - 1;
  }
  cout << res1 << " " << res2;
}
