#include <bits/stdc++.h>
using namespace std;
void out() {
  cout << "Yes\n";
  exit(0);
}
const double eps = 1e-7;
const int N = 2e6 + 9;
long long n, S, ans, x, m, l, r, a[N];
long long calc(long long k) {
  vector<long long> v;
  for (int i = 0; i < n; i++) v.push_back(a[i] + (i + 1) * k);
  sort(v.begin(), v.end());
  long long res = 0;
  for (int i = 0; i < k; i++) res += v[i];
  return res;
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> S;
  for (int i = 0; i < n; i++) cin >> a[i];
  l = 0;
  r = n + 1;
  while (l + 1 < r) {
    m = (l + r) / 2;
    x = calc(m);
    if (x <= S)
      ans = x, l = m;
    else
      r = m;
  }
  cout << l << " " << ans;
  return 0;
}
