#include <bits/stdc++.h>
using namespace std;
const int N = 100000;
long long n, s, a[N];
int main() {
  vector<long long> v;
  cin >> n >> s;
  for (int i = 0; i < n; i++) cin >> a[i];
  long long l = 0, r = n, m, k = 0, cost = 0;
  while (l <= r) {
    m = (l + r) / 2;
    vector<long long> v;
    for (int i = 0; i < n; i++) v.push_back(a[i] + (long long)(i + 1) * m);
    sort(v.begin(), v.end());
    long long c = 0;
    for (int i = 0; i < m; i++) c += v[i];
    if (c <= s) {
      k = m;
      cost = c;
      l = m + 1;
    } else
      r = m - 1;
  }
  cout << k << " " << cost;
}
