#include <bits/stdc++.h>
using namespace std;
long long binPow(long long a, long long b, long long Mo) {
  long long ans = 1;
  for (; b; b >>= 1, a = a * a % Mo)
    if (b & 1) ans = ans * a % Mo;
  return ans;
}
int main() {
  int n, S;
  cin >> n >> S;
  vector<pair<long long, int> > v;
  for (int i = 0; i < n; i++) {
    long long a;
    cin >> a;
    v.push_back(make_pair(a, i + 1));
  }
  long long l, h;
  l = 0;
  h = n - 1;
  while (h - l > 1) {
    long long mid = (h + l) / 2;
    vector<long long> val;
    for (int i = 0; i < n; i++) {
      long long a = v[i].first + v[i].second * (mid + 1);
      val.push_back(a);
    }
    sort(val.begin(), val.end());
    long long ans = 0;
    for (int i = 0; i < mid + 1; i++) {
      ans += val[i];
    }
    if (ans <= S) {
      l = mid;
    } else
      h = mid;
  }
  long long cost, K;
  cost = -1;
  vector<long long> val;
  long long ans = 0;
  for (int i = 0; i < n; i++) {
    long long a = v[i].first + v[i].second * (l + 1);
    val.push_back(a);
  }
  sort(val.begin(), val.end());
  for (int i = 0; i < l + 1; i++) {
    ans += val[i];
  }
  if (ans <= S) {
    cost = ans;
    K = l;
  }
  if (h != l) {
    vector<long long> val2;
    long long ans2 = 0;
    for (int i = 0; i < n; i++) {
      long long a = v[i].first + v[i].second * (h + 1);
      val2.push_back(a);
    }
    sort(val2.begin(), val2.end());
    for (int i = 0; i < h + 1; i++) {
      ans2 += val2[i];
    }
    if (ans2 <= S) {
      cost = ans2;
      K = h;
    }
  }
  if (cost == -1) {
    cout << 0 << " " << 0 << endl;
    return 0;
  }
  cout << (K + 1) << " " << cost << endl;
  return 0;
}
