#include <bits/stdc++.h>
using namespace std;
const long long int inf = 1e+18;
long long int c = 0, sum = 0;
bool comp(pair<long long int, long long int> a,
          pair<long long int, long long int> b) {
  if (a.first > b.first)
    return true;
  else if (a.first == b.first) {
    if (a.second <= b.second)
      return true;
    else
      return false;
  }
  return false;
}
bool ok(long long int k, vector<long long int> v, long long int s) {
  c = 0;
  sum = 0;
  for (long long int i = 0; i < v.size(); i++) {
    v[i] = v[i] + (k * (i + 1));
  }
  sort(v.begin(), v.end());
  for (long long int i = 0; i < v.size() && c < k; i++) {
    if ((s - v[i]) >= 0) {
      c++;
      sum += v[i];
      s -= v[i];
    } else
      break;
  }
  if (c == k) {
    c = k;
    return true;
  }
  return false;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long int n, s;
  cin >> n >> s;
  vector<long long int> v(n);
  for (long long int i = 0; i < n; i++) {
    cin >> v[i];
  }
  long long int low = 1, high = n;
  vector<pair<long long int, long long int> > ans;
  while (low <= high) {
    long long int mid = low + (high - low) / 2;
    if (ok(mid, v, s)) {
      ans.push_back({c, sum});
      low = mid + 1;
    } else {
      ans.push_back({c, sum});
      high = mid - 1;
    }
  }
  sort(ans.begin(), ans.end(), comp);
  cout << ans[0].first << " " << ans[0].second;
}
