#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  long long n, s;
  cin >> n >> s;
  long long A[n + 5];
  long long B[n + 5];
  for (long long i = 0; i < n; i++) cin >> A[i];
  long long lo = 1, hi = n;
  long long Ans1 = 0, Ans2 = 0;
  long long mid;
  while (lo <= hi) {
    bool Poss = false;
    mid = (lo + hi) / 2;
    long long Sum = 0;
    for (long long i = 0; i < n; i++) B[i] = A[i] + (i + 1) * mid;
    sort(B, B + n);
    for (long long i = 0; i < mid; i++) Sum += B[i];
    if (Sum <= s) Poss = true;
    if (Poss) {
      Ans1 = mid;
      Ans2 = Sum;
      lo = mid + 1;
    } else {
      hi = mid - 1;
    }
  }
  cout << Ans1 << " " << Ans2;
  return 0;
}
