#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
long long a[maxn];
long long b[maxn];
int main() {
  int n, s, i;
  long long j;
  cin >> n >> s;
  for (i = 1; i <= n; i++) {
    scanf("%lld", &a[i]);
  }
  long long l = 0, r = n, mid;
  long long m, ans = 0, sum = 0;
  for (i = 0; i < 100; i++) {
    mid = (l + r) >> 1;
    m = 0;
    for (j = 1; j <= n; j++) {
      b[j] = a[j] + j * mid;
    }
    sort(b + 1, b + n + 1);
    for (j = 1; j <= mid; j++) {
      m += b[j];
      if (m > s) break;
    }
    if (j <= mid) {
      r = mid - 1;
    } else {
      ans = mid;
      sum = m;
      l = mid + 1;
    }
  }
  printf("%lld %lld\n", ans, sum);
  return 0;
}
