#include <bits/stdc++.h>
using namespace std;
pair<long long, long long> fund(long long m, long long A[], long long n,
                                long long S) {
  long long B[n], C[n], sum = 0, next_sum = 0;
  for (long long i = 1; i <= n; i++) {
    B[i - 1] = A[i] + i * m;
    C[i - 1] = A[i] + i * (m + 1);
  }
  sort(B, B + n);
  sort(C, C + n);
  for (long long i = 0; i < m; i++) {
    sum += B[i];
    next_sum += C[i];
  }
  if (m == n) {
    return make_pair(1, sum);
  }
  next_sum += C[m];
  if (sum > S) {
    return make_pair(0, sum);
  } else if (next_sum <= S) {
    return make_pair(2, sum);
  } else {
    return make_pair(1, sum);
  }
}
void solve();
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int t = 1;
  while (t--) {
    solve();
    cout << "\n";
  }
  return 0;
}
void solve() {
  long long n, S, low = 1, high, mid, f, k, T;
  cin >> n >> S;
  high = n;
  long long A[n + 1];
  for (long long i = 1; i <= n; i++) {
    cin >> A[i];
  }
  while (low <= high) {
    mid = (low + high + 1) / 2;
    pair<long long, long long> f = fund(mid, A, n, S);
    if (f.first == 0) {
      high = mid - 1;
    } else if (f.first == 2) {
      low = mid;
    } else {
      k = mid;
      T = f.second;
      break;
    }
  }
  if (T > S) {
    cout << "0 0";
  } else {
    cout << k << " " << T;
  }
}
