#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, S;
  cin >> n >> S;
  int a[n];
  for (int i = 0; i <= n - 1; i++) cin >> a[i];
  int left = 1, right = n;
  int middle = (left + right) / 2;
  int k = 0, T = 0;
  while (left <= right) {
    middle = (left + right) / 2;
    long long int b[n];
    for (int i = 0; i <= n - 1; i++)
      b[i] = (long long)a[i] + (long long)middle * (i + 1);
    sort(b, b + n);
    long long int sum = 0;
    for (int i = 0; i <= middle - 1; i++) sum += b[i];
    if (sum <= S) {
      k = middle;
      T = sum;
      left = middle + 1;
    } else {
      right = middle - 1;
    }
  }
  cout << k << " " << T;
  return 0;
}
