#include <bits/stdc++.h>
long long max(long long a, long long b) { return a > b ? a : b; }
long long min(long long a, long long b) { return a < b ? a : b; }
using namespace std;
int P[100005];
long long Q[100005];
long long ans = 0;
priority_queue<int, vector<int>, greater<int> > q;
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  for (long long i = 0; i < n; i++) scanf("%d", &P[i]);
  int a = 0, b = n;
  int k1 = 0;
  long long ans3 = 9223372036854775807;
  while (a <= b) {
    int k2 = (a + b) / 2, k;
    ans = 0;
    while (!q.empty()) q.pop();
    for (long long i = 0; i < n; i++) {
      Q[i] = P[i] + (long long)(i + 1) * k2;
      if (Q[i] > 0x7fffffff) Q[i] = 0x7fffffff;
      q.push(Q[i]);
    }
    int r = k2;
    while (r--) {
      ans += q.top();
      if (ans > m) break;
      q.pop();
    }
    if (ans <= m && k2 > k1) {
      k1 = k2;
      ans3 = ans;
    }
    if (ans <= m)
      a = k2 + 1;
    else
      b = k2 - 1;
  }
  if (ans3 == 9223372036854775807) ans3 = 0;
  cout << k1 << " " << ans3 << endl;
  return 0;
}
