#include <bits/stdc++.h>
using namespace std;
long long a[100005], dp[100005];
int n;
long long cal(int k) {
  for (int i = 1; i <= n; ++i) {
    dp[i] = a[i] + (long long)i * k;
  }
  long long ans = 0ll;
  sort(dp + 1, dp + 1 + n);
  for (int i = 1; i <= k; ++i) ans += dp[i];
  return ans;
}
void solveC() {
  long long S;
  cin >> n >> S;
  memset(dp, 0, sizeof dp);
  for (int i = 1; i <= n; ++i) cin >> a[i];
  int l = 1, r = n;
  int pos = 1;
  while (l <= r) {
    int k = l + r >> 1;
    long long ans = cal(k);
    if (ans > S)
      r = k - 1;
    else
      l = k + 1;
  }
  if (l > n || cal(l) > S) --l;
  cout << l << " ";
  cout << cal(l) << endl;
}
int main() {
  ios::sync_with_stdio(false);
  solveC();
  return 0;
}
