#include <bits/stdc++.h>
using namespace std;
long long check(long long k, int *arr, long long n) {
  unsigned long long sum = 0;
  long long res[n];
  for (int i = 0; i < n; i++) {
    res[i] = arr[i] + ((i + 1) * k);
  }
  sort(res, res + n);
  for (int i = 0; i < k; i++) {
    sum += res[i];
  }
  return sum;
}
int main() {
  long long n, money;
  cin >> n >> money;
  int arr[n];
  for (int i = 0; i < n; i++) cin >> arr[i];
  long long hi = n, lo = 0, mid;
  for (int i = 0; i < 32; i++) {
    mid = (lo + hi) / 2;
    if (check(mid, arr, n) <= money) {
      lo = mid + 1;
    } else {
      hi = mid - 1;
    }
  }
  cout << mid << " " << check(mid, arr, n);
  return 0;
}
