#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n, s, i, k;
  vector<pair<long long int, long long int>> v;
  cin >> n >> s;
  for (i = 0; i < n; i++) {
    cin >> k;
    v.push_back({k, i + 1});
  }
  vector<long long int> ans;
  long long int l = 1, r = n, mid, mans = 0, sum, pos = 0, flag = 0;
  while (l <= r) {
    ans.clear();
    sum = 0;
    mid = (l + r) / 2;
    for (i = 0; i < n; i++) {
      ans.push_back((v[i].first + v[i].second * mid));
    }
    sort(ans.begin(), ans.end());
    for (i = 0; i < mid; i++) {
      sum = sum + ans[i];
    }
    if (sum > s)
      r = mid - 1;
    else {
      l = mid + 1;
      if (sum > mans) {
        pos = mid;
        mans = sum;
      }
    }
  }
  cout << pos << " " << mans << "\n";
}
