#include <bits/stdc++.h>
using namespace std;
long long spend(int x, vector<long long> a) {
  int n = (int)a.size();
  for (int i = 0; i < n; i++) {
    a[i] += x * 1LL * (i + 1);
  }
  sort(a.begin(), a.end());
  long long spend = 0;
  for (int i = 0; i < x; i++) {
    spend += a[i];
  }
  return spend;
}
int main() {
  int n;
  long long s;
  cin >> n >> s;
  vector<long long> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int lo = 0;
  int hi = n;
  while (lo < hi) {
    int mid = (lo + hi + 1) / 2;
    if (spend(mid, a) <= s) {
      lo = mid;
    } else {
      hi = mid - 1;
    }
  }
  cout << lo << " " << spend(lo, a) << endl;
}
