#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  long long n, S;
  cin >> n >> S;
  long long base[n];
  long long price[n];
  for (int i = 0; i < n; i++) cin >> base[i];
  long long finalcost = 0;
  long long low = 0, high = n;
  while (low != high) {
    long long mid = (low + high + 1) / 2;
    for (int i = 0; i < n; i++) {
      price[i] = base[i] + (i + 1) * mid;
    }
    sort(price, price + n);
    long long totalcost = 0;
    for (int i = 0; i < mid; i++) {
      totalcost += price[i];
    }
    if (totalcost <= S) {
      low = mid;
      finalcost = totalcost;
    } else {
      high = mid - 1;
    }
  }
  cout << low << " " << finalcost << endl;
}
