#include <bits/stdc++.h>
using namespace std;
bool check(vector<long long> &a, long long lim, long long k) {
  vector<long long> b(a.size());
  for (long long i = 0; i < a.size(); i++) b[i] = a[i] + (i + 1) * k;
  sort(b.begin(), b.end());
  long long sum = 0;
  for (long long i = 0; i < k; i++) sum += b[i];
  if (sum > lim) return false;
  return true;
}
void bs(vector<long long> &a, long long lim, long long &bought,
        long long &spent) {
  long long l = 0, r = a.size() + 1;
  while (r - l > 1) {
    long long m = l + (r - l) / 2;
    if (check(a, lim, m))
      l = m;
    else
      r = m;
  }
  bought = l;
  vector<long long> b(a.size());
  for (long long i = 0; i < a.size(); i++) b[i] = a[i] + (i + 1) * bought;
  sort(b.begin(), b.end());
  spent = 0;
  for (long long i = 0; i < bought; i++) spent += b[i];
  return;
}
int main() {
  long long n, s;
  cin >> n >> s;
  vector<long long> a(n);
  for (long long i = 0; i < n; i++) cin >> a[i];
  long long bought, spent;
  bs(a, s, bought, spent);
  cout << bought << ' ' << spent << endl;
  return 0;
}
