#include <bits/stdc++.h>
using namespace std;
int main() {
  std::ios_base::sync_with_stdio(false);
  long long n, s;
  cin >> n >> s;
  vector<long long> a, b;
  long long x;
  for (long long i = 0; i < n; i++) {
    cin >> x;
    a.push_back(x);
  }
  long long low = 0, hgh = n, mid, ans2 = 0, ans1 = 0;
  while (hgh >= low) {
    mid = (low + hgh) / 2;
    for (long long i = 0; i < n; i++) b.push_back(a[i] + (i + 1) * mid);
    sort(b.begin(), b.end());
    long long sum = 0;
    for (long long i = 0; i < mid; i++) sum = sum + b[i];
    if (sum <= s) {
      if (mid >= ans2) {
        ans2 = mid;
        ans1 = sum;
      }
      low = mid + 1;
    } else
      hgh = mid - 1;
    b.clear();
  }
  cout << ans2 << " " << ans1;
  return 0;
}
