#include <bits/stdc++.h>
using namespace std;
typedef struct {
  long long int x, y;
} pt;
bool operator<(pt x, pt y) { return (x.x < y.x); }
long long int res(pt A[], pt B[], long long int n, long long int k,
                  long long int p) {
  long long int sum = 0;
  for (int i = 0; i < n; ++i) {
    B[i].x = A[i].x + k * (i + 1);
  }
  sort(B, B + n);
  for (int i = 0; i < p + 1; ++i) {
    sum = sum + B[i].x;
  }
  return (sum);
}
void solve(pt A[], pt B[], long long int n, long long int S, long long int klow,
           long long int khigh) {
  long long int kmid = (khigh + klow) / 2;
  if (res(A, B, n, khigh + 1, khigh) <= S) {
    cout << khigh + 1 << " " << res(A, B, n, khigh + 1, khigh) << endl;
    return;
  } else if (res(A, B, n, kmid + 1, kmid) == S) {
    cout << kmid + 1 << " " << S << endl;
    return;
  } else if (res(A, B, n, kmid + 1, kmid) < S) {
    if (kmid + 1 <= khigh && res(A, B, n, kmid + 2, kmid + 1) > S) {
      cout << kmid + 1 << " " << res(A, B, n, kmid + 1, kmid) << endl;
      return;
    } else {
      solve(A, B, n, S, kmid + 1, khigh);
    }
  } else {
    solve(A, B, n, S, klow, kmid - 1);
  }
}
int main() {
  long long int S, n;
  cin >> n >> S;
  pt A[100000], B[100000];
  for (int i = 0; i < n; ++i) {
    cin >> A[i].x;
    A[i].y = i + 1;
  }
  solve(A, B, n, S, 0, n - 1);
}
