#include <bits/stdc++.h>
using namespace std;
long long ans, ans2;
bool is_config(long long* arr, long long n, long long s, long long mid) {
  long long sum = 0;
  long long ar[n];
  for (int i = 0; i < n; i++) ar[i] = arr[i] + (i + 1) * mid;
  sort(ar, ar + n);
  for (int i = 0; i < mid; i++) sum += ar[i];
  if (sum <= s) {
    ans2 = sum;
    return true;
  } else
    return false;
}
void bin_srch(long long* arr, long long n, long long s) {
  long long ss = 0, e = n, mid;
  while (ss <= e) {
    mid = (ss + e) >> 1;
    if (is_config(arr, n, s, mid)) {
      ans = mid;
      ss = mid + 1;
    } else
      e = mid - 1;
  }
}
int main() {
  long long n;
  long long s;
  cin >> n >> s;
  long long arr[n];
  for (int i = 0; i < n; i++) cin >> arr[i];
  bin_srch(arr, n, s);
  cout << ans << " " << ans2;
  return 0;
}
