#include <bits/stdc++.h>
using namespace std;
long long n, s, a[200005], b[200005], sum = 0, mn, k, m;
bool ok(long long m) {
  sum = 0;
  for (long long i = 0; i < n; i++) {
    b[i] = (a[i] + (i + 1) * m);
  }
  sort(b, b + n);
  for (long long i = 0; i < m; i++) {
    sum += b[i];
  }
  if (sum <= s) {
    return true;
  } else
    return false;
}
int main() {
  ios::sync_with_stdio(0), cin.tie(NULL), cout.tie(NULL);
  cin >> n >> s;
  for (int i = 0; i < n; i++) cin >> a[i];
  long long l = 1, r = n;
  while (l <= r) {
    long long mid = (l + r) / 2;
    if (ok(mid)) {
      mn = sum;
      k = mid;
      l = mid + 1;
    } else
      r = mid - 1;
  }
  cout << k << " " << mn;
  return 0;
}
