#include <bits/stdc++.h>
using namespace std;
long long n, s, ans, arr[100100], cost[100100];
bool ok(long long m) {
  for (int i = 1; i <= n; i++) cost[i] = arr[i] + i * m;
  sort(cost + 1, cost + n + 1);
  long long xans = 0;
  for (int i = 1; i <= m; i++) {
    xans += cost[i];
  }
  if (xans <= s) ans = xans;
  return (xans <= s);
}
int main() {
  cin >> n >> s;
  for (int i = 1; i <= n; i++) {
    cin >> arr[i];
  }
  long long l = 0, r = n, mid;
  while (l < r) {
    mid = (l + r + 1) / 2;
    if (ok(mid))
      l = mid;
    else
      r = mid - 1;
  }
  cout << l << " " << ans << endl;
  return 0;
}
