#include <bits/stdc++.h>
using namespace std;
long long a[100005];
long long n, S;
long long check(long long x) {
  long long val = 0;
  vector<long long> b;
  for (long long i = 0; i < n; i++) {
    b.push_back(a[i] + (i + 1) * x);
  }
  sort((b).begin(), (b).end());
  for (int i = 0; i < x; i++) {
    val += b[i];
  }
  return val;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n >> S;
  long long k, T;
  for (int i = 0; i < n; i++) cin >> a[i];
  k = 0, T = 0;
  long long lo = 0, hi = n;
  while (lo <= hi) {
    long long mid = (lo + hi) / 2;
    long long val = check(mid);
    if (val <= S) {
      if (mid == k) {
        if (val < T) T = val;
      } else if (mid > k) {
        k = mid;
        T = val;
      }
      lo = mid + 1;
    } else {
      hi = mid - 1;
    }
  }
  cout << k << " " << T << endl;
  return 0;
}
