#include <bits/stdc++.h>
using namespace std;
long long a[100010], b[100010], sum;
int n, m;
bool check(int x) {
  for (int i = 1; i <= n; ++i) {
    b[i] = a[i] + (long long)i * (long long)x;
  }
  sum = 0;
  sort(b + 1, b + n + 1);
  for (int i = 1; i <= x; ++i) {
    sum += b[i];
  }
  return sum <= (long long)m;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; ++i) {
    scanf("%I64d", &a[i]);
  }
  int l = 0, r = n;
  while (l < r) {
    int mid = (l + r + 1 >> 1);
    if (check(mid)) {
      l = mid;
    } else {
      r = mid - 1;
    }
  }
  check(l);
  printf("%d %I64d\n", l, sum);
  return 0;
}
