#include <bits/stdc++.h>
using namespace std;
int n, s;
const int N = 1e5 + 10;
int v[N];
int ans;
bool check(int x, int &res) {
  int k[n];
  for (int i = 0; i < n; i++) {
    k[i] = v[i] + (i + 1) * x;
  }
  sort(k, k + n);
  for (int i = 0; i < x; i++)
    if (res <= s) res += k[i];
  return res <= s;
}
int main() {
  cin >> n >> s;
  for (int i = 0; i < n; i++) {
    cin >> v[i];
  }
  int hi = n + 1;
  int lo = 0;
  for (int i = 0; i < 100; i++) {
    int mid = (hi + lo) >> 1;
    int valor = 0;
    if (check(mid, valor)) {
      ans = valor;
      lo = mid;
    } else
      hi = mid;
  }
  cout << lo << " " << ans << endl;
  return 0;
}
