#include <bits/stdc++.h>
using namespace std;
long long n, p, i, j, go, sum, k, hey[100001], mas[100001];
pair<long long, long long> ans;
int main() {
  cin >> n >> p;
  for (i = 1; i <= n; i++) cin >> mas[i];
  for (i = 16; i >= 0; i--) {
    go = (1 << i);
    if (k + go > n) continue;
    k += go;
    sum = 0;
    for (j = 1; j <= n; j++) hey[j] = mas[j] + j * k;
    sort(hey + 1, hey + n + 1);
    for (j = 1; j <= k; j++) sum += hey[j];
    if (sum <= p)
      ans = max(ans, make_pair(k, -sum));
    else
      k -= go;
  }
  cout << ans.first << " " << -ans.second << endl;
  return 0;
}
