#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
long long n, s, ans, ans2, ret;
struct Node {
  long long val, tmp;
  int id;
} node[N];
bool cmp(Node A, Node B) { return A.tmp < B.tmp; }
bool check(int x) {
  for (int i = 1; i <= n; i++) {
    node[i].tmp = node[i].val + node[i].id * 1ll * x;
  }
  sort(node + 1, node + 1 + n, cmp);
  ret = 0;
  for (int i = 1; i <= x; i++) {
    ret += node[i].tmp;
  }
  if (ret <= s) {
    return 1;
  }
  return 0;
}
int main() {
  scanf("%lld%lld", &n, &s);
  for (int i = 1; i <= n; i++) {
    scanf("%lld", &node[i].val);
    node[i].id = i;
  }
  int L = 0, R = n, mid;
  while (L <= R) {
    mid = (L + R) >> 1;
    if (check(mid)) {
      ans = mid;
      ans2 = ret;
      L = mid + 1;
    } else {
      R = mid - 1;
    }
  }
  cout << ans << ' ' << ans2 << endl;
  return 0;
}
