#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e15;
const int MOD = 1e9 + 7;
int n;
long long s, a[100000], b[100000], cost;
bool can(int x) {
  for (int(i) = 0; (i) < (n); (i)++)
    b[i] = a[i] + (long long)x * (long long)((long long)i + 1ll);
  sort(b, b + n);
  cost = 0;
  for (int(i) = 0; (i) < (x); (i)++) {
    cost += b[i];
  }
  return (cost <= s);
}
int main() {
  scanf("%d %lld", &n, &s);
  for (int(i) = 0; (i) < (n); (i)++) scanf("%lld", &a[i]);
  int l = 0, r = n, an = -1;
  while (l <= r) {
    int m = (l + r) / 2;
    if (can(m)) {
      an = m;
      l = m + 1;
    } else
      r = m - 1;
  }
  can(an);
  printf("%d %lld\n", an, cost);
  return 0;
}
