#include <bits/stdc++.h>
long long n, S;
long long cost[100005];
long long K, T, a[100005], sum, b[100005];
void Qsort(long long *b, long long left, long long right) {
  if (left >= right) return;
  long long l = left, r = right;
  long long key = b[left];
  while (l < r) {
    while (l < r && b[r] >= key) r--;
    b[l] = b[r];
    while (l < r && b[l] <= key) l++;
    b[r] = b[l];
  }
  b[l] = key;
  Qsort(b, left, l - 1);
  Qsort(b, l + 1, right);
}
void Msort(long long left, long long right) {
  if (left >= right) return;
  long long mid = (left + right) / 2, l1 = left, l2 = mid + 1, l = left;
  Msort(left, mid);
  Msort(mid + 1, right);
  while (l1 <= mid && l2 <= right && l <= right) {
    if (cost[l1] < cost[l2])
      b[l++] = cost[l1++];
    else
      b[l++] = cost[l2++];
  }
  while (l1 <= mid) b[l++] = cost[l1++];
  while (l2 <= right) b[l++] = cost[l2++];
  l = left;
  while (l <= right) {
    cost[l] = b[l];
    l++;
  }
}
int main() {
  long long i, j, k;
  while (scanf("%lld%lld", &n, &S) != EOF) {
    for (i = 1; i <= n; i++) scanf("%lld", a + i);
    long long l = 1, r = n, mid;
    T = sum = K = 0;
    while (l <= r) {
      mid = (l + r) / 2;
      for (i = 1; i <= n; i++) cost[i] = a[i] + i * mid;
      sum = 0;
      Msort(1, n);
      for (i = 1; i <= mid; i++) sum += cost[i];
      if (sum <= S) {
        l = mid + 1;
        K = mid;
        T = sum;
      } else
        r = mid - 1;
    }
    printf("%lld %lld\n", K, T);
  }
}
