#include <bits/stdc++.h>
using namespace std;
long long a[100005], b[100005];
int main() {
  long long j, k, n, S, l = 0, r, m, cost = 0, pmax = 0, pcost = 0;
  cin >> n >> S;
  for (long i = 0; i < n; i++) cin >> a[i];
  r = n;
  while (l < r) {
    m = (l + r + 1) / 2;
    for (long i = 0; i < n; i++) {
      b[i] = a[i] + ((i + 1) * m);
    }
    sort(b, b + n);
    k = 0;
    for (long long i = 0; i < m; i++) {
      k += b[i];
      if (k > S) {
        r = m - 1;
        break;
      }
    }
    if (k <= S) {
      l = m;
      pmax = m;
      pcost = k;
    }
  }
  cout << l << " " << pcost << endl;
  return 0;
}
