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