#include <bits/stdc++.h>
const int MAXN = 100005;
int n, k;
long long s;
using namespace std;
struct Record {
  int num;
  long long value;
} a[MAXN];
bool cmp(const Record& x, const Record& y) {
  return x.value + x.num * k < y.value + y.num * k;
}
bool check(int x) {
  k = x;
  sort(a + 1, a + n + 1, cmp);
  long long sum = 0;
  for (int i = 1; i <= x; i++) sum += a[i].value + (long long)a[i].num * k;
  return sum <= s;
}
int main() {
  scanf("%d%lld", &n, &s);
  for (int i = 1; i <= n; i++) {
    scanf("%lld", &a[i].value);
    a[i].num = i;
  }
  int left = 0, right = n + 1, mid = (n + 1) / 2;
  while (right - left > 1) {
    if (check(mid))
      left = mid;
    else
      right = mid;
    mid = (left + right) / 2;
  }
  k = left;
  sort(a + 1, a + n + 1, cmp);
  long long ans = 0;
  for (int i = 1; i <= k; i++) ans += a[i].value + (long long)a[i].num * k;
  printf("%d %lld\n", k, ans);
  return 0;
}
