#include <bits/stdc++.h>
using namespace std;
long long n, s, a[1000000], lo, hi, mid, ans, b[1000000];
bool num(long long x) {
  long long g = 0;
  for (int i = 1; i <= n; i++) {
    b[i] = a[i] + x * i;
  }
  sort(b + 1, b + n + 1);
  for (int i = 1; i <= x; i++) {
    g += b[i];
  }
  if (g <= s) {
    ans = g;
    return 1;
  } else
    return 0;
}
int main() {
  cin >> n >> s;
  for (int i = 1; i <= n; i++) cin >> a[i];
  lo = 0;
  hi = n;
  while (lo < hi) {
    mid = (lo + hi + 1) / 2;
    if (num(mid))
      lo = mid;
    else
      hi = mid - 1;
  }
  cout << lo << " " << ans;
  return 0;
}
