#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  long long int s, cost = 0, ans = 0;
  cin >> n;
  cin >> s;
  int arr[n + 1];
  long long int val[n + 1];
  val[0] = 0;
  arr[0] = 0;
  for (int i = 1; i <= n; i++) {
    cin >> arr[i];
  }
  int l = 0, r = n;
  while (l < r) {
    int mid = (l + r) / 2;
    cost = 0;
    for (int i = 1; i <= n; i++) {
      val[i] = arr[i] + (long long)i * mid;
    }
    sort(val, val + n + 1);
    for (int i = 1; i <= mid; i++) {
      cost += val[i];
    }
    if (cost < s) {
      ans = mid;
      l = mid + 1;
    } else {
      r = mid - 1;
    }
  }
  cost = 0;
  for (int i = 1; i <= n; i++) {
    val[i] = arr[i] + (long long)i * l;
  }
  sort(val, val + n + 1);
  for (int i = 1; i <= l; i++) {
    cost += val[i];
  }
  if (l == 0) {
    cout << "0 0";
  } else {
    if (cost > s) {
      l--;
      cost = 0;
      for (int i = 1; i <= n; i++) {
        val[i] = arr[i] + (long long)i * l;
      }
      sort(val, val + n + 1);
      for (int i = 1; i <= l; i++) {
        cost += val[i];
      }
      cout << l << " " << cost;
    } else {
      cout << l << " " << cost;
    }
  }
  return 0;
}
