#include <bits/stdc++.h>
const long long int mod = 1e9 + 7;
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long int n;
  cin >> n;
  long long int s;
  cin >> s;
  long long int a[n];
  for (long long int i = 0; i < n; i++) cin >> a[i];
  long long int i = 1, j = n;
  long long int mx = 0, cost = 0;
  while (i <= j) {
    long long int mid = (i + j) / 2;
    vector<long long int> v(n, 0);
    for (long long int k = 0; k < n; k++) {
      v[k] = a[k] + (k + 1) * mid;
    }
    sort(v.begin(), v.end());
    long long int sum = 0;
    for (long long int k = 0; k < mid; k++) {
      sum += v[k];
    }
    if (sum <= s) {
      mx = mid;
      cost = sum;
      i = mid + 1;
    } else {
      j = mid - 1;
    }
  }
  cout << mx << " " << cost;
}
