#include <bits/stdc++.h>
using namespace std;
const int N = 100001;
int n, s;
int a[N];
long long b[N];
long long cost(int k) {
  for (int i = 0; i < n; i++) {
    b[i] = a[i] + (i + 1) * (long long)k;
  }
  sort(b, b + n);
  long long sum = 0;
  for (int i = 0; i < k; i++) {
    sum += b[i];
  }
  return sum;
}
int main() {
  cin >> n >> s;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int l = 0, r = n + 1;
  while (l < r - 1) {
    int m = (l + r) / 2;
    if (cost(m) <= s) {
      l = m;
    } else {
      r = m;
    }
  }
  cout << l << " " << cost(l) << endl;
  return 0;
}
