#include <bits/stdc++.h>
using namespace std;
const int maxn = 10e5;
int minc, maxk = 0;
long long int a[maxn], c[maxn];
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cout << setprecision(30);
  int n, s;
  cin >> n >> s;
  for (int i = 0; i < n; i++) cin >> a[i];
  int l = 0, r = n + 1;
  while (r - l > 1) {
    long long int mid = (l + r) / 2, tc = 0;
    for (int i = 0; i < n; i++) c[i] = mid * (i + 1) + a[i];
    sort(c, c + n);
    for (int i = 0; i < mid; i++) tc += c[i];
    if (tc > s) {
      r = mid;
    }
    if (tc <= s) {
      minc = tc;
      maxk = mid;
      l = mid;
    }
  }
  cout << maxk << " " << minc;
  return 0;
}
