#include <bits/stdc++.h>
using namespace std;
long long n, x;
long long a[100000], b[100000];
long long works(long long mid) {
  for (long long i = 0; i < n; i++) b[i] = a[i] + (i + 1) * mid;
  sort(b, b + n);
  long long c = 0;
  for (long long i = 0; i < mid; i++) c += b[i];
  if (c > x) return -1;
  return c;
}
int32_t main() {
  cin >> n >> x;
  for (long long i = 0; i < n; i++) cin >> a[i];
  long long s = 0, e = n;
  long long ans = 0, cost = 0;
  while (s <= e) {
    long long mid = s + (e - s) / 2;
    long long gg = works(mid);
    if (gg != -1) {
      ans = mid;
      cost = gg;
      s = mid + 1;
    } else
      e = mid - 1;
  }
  cout << ans << " " << cost;
}
