#include <bits/stdc++.h>
using namespace std;
const int N = 100000 + 5;
int n, S;
int a[N];
long long now[N];
bool check(int x, int& ans2) {
  for (int i = 1; i <= n; i++) {
    now[i] = a[i] + 1ll * i * x;
  }
  sort(now + 1, now + 1 + n);
  long long sum = 0;
  for (int i = 1; i <= x; i++) {
    sum += now[i];
    if (sum > S) return false;
  }
  ans2 = sum;
  return true;
}
int main() {
  scanf("%d%d", &n, &S);
  for (int i = 1; i <= n; i++) scanf("%d", a + i);
  int L = 0, R = n, ans1 = 0, ans2 = 0;
  while (L <= R) {
    int M = L + R >> 1;
    if (check(M, ans2)) {
      L = M + 1;
      ans1 = M;
    } else
      R = M - 1;
  }
  printf("%d %d\n", ans1, ans2);
  return 0;
}
