#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const double PI = 3.141592653589793238463;
const int MAXN = 100005;
long long n, s;
long long temp = 0;
long long arr[MAXN];
bool ok(long long mid) {
  long long tArray[n];
  for (long long i = 0; i < n; i++) {
    tArray[i] = (arr[i] + ((i + 1) * mid));
  }
  sort(tArray, tArray + n);
  temp = 0;
  long long t = mid;
  for (int i = 0; i < t; i++) {
    if (temp + tArray[i] <= s) {
      temp += tArray[i];
    } else {
      return 0;
    }
  }
  return 1;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> s;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  long long l = 0, r = n;
  long long ans = 0;
  long long mn = 0;
  while (l <= r) {
    long long mid = l + (r - l) / 2;
    if (ok(mid)) {
      ans = mid;
      mn = temp;
      l = mid + 1;
    } else {
      r = mid - 1;
    }
  }
  cout << ans << " " << mn << '\n';
  return 0;
}
