#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 5;
int n, s, a[MAXN];
int main() {
  scanf("%d%d", &n, &s);
  for (int i = 0; i < n; ++i) {
    scanf("%d", a + i);
  }
  int lo = 0, hi = n;
  while (lo < hi) {
    int mid = (lo + hi + 1) / 2;
    vector<long long> v;
    for (int i = 0; i < n; ++i) {
      v.push_back(a[i] + (long long)mid * (i + 1));
    }
    sort(v.begin(), v.end());
    long long sum = 0;
    for (int i = 0; i < mid; ++i) {
      if (s < sum) break;
      sum += v[i];
    }
    if (sum > s) {
      hi = mid - 1;
    } else {
      lo = mid;
    }
  }
  vector<long long> v;
  for (int i = 0; i < n; ++i) {
    v.push_back((long long)a[i] + (long long)lo * (i + 1));
  }
  sort(v.begin(), v.end());
  long long sol = 0;
  for (int i = 0; i < lo; ++i) {
    sol += v[i];
  }
  printf("%d %lld\n", lo, sol);
  return 0;
}
