#include <bits/stdc++.h>
using namespace std;
struct obj {
  long long int index;
  long long int base;
};
vector<obj> arr;
vector<long long int> costs;
long long int res(int k, int n) {
  for (int i = 0; i < n; i++) {
    costs[i] = arr[i].base + arr[i].index * k;
  }
  sort(costs.begin(), costs.end());
  long long int ans = 0;
  for (int i = 0; i < k; i++) {
    ans += costs[i];
  }
  return ans;
}
void solve(int t) {
  long long int n, S, l, r, max = INT_MIN, cost, mid, ans;
  cin >> n >> S;
  for (int i = 1; i <= n; i++) {
    obj tmp;
    cin >> tmp.base;
    tmp.index = i;
    arr.push_back(tmp);
    costs.push_back(0);
  }
  l = 0;
  r = n;
  while (l <= r) {
    mid = (l + r) / 2;
    ans = res(mid, n);
    if (ans <= S) {
      l = mid + 1;
      if (mid > max) {
        max = mid;
        cost = ans;
      }
    } else
      r = mid - 1;
  }
  cout << max << " " << cost;
}
int main() {
  int t = 1;
  for (int i = 0; i < t; i++) {
    solve(i + 1);
  }
}
