#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
long long powmod(long long a, long long b, long long MOD) {
  long long ans = 1;
  while (b) {
    if (b % 2) ans = ans * a % MOD;
    a = a * a % MOD;
    b /= 2;
  }
  return ans;
}
const int N = 2e5 + 11;
int n, m, a[N];
long long sum = 0, ans, b[N];
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> m;
  for (int i = 1; i <= n; i++) cin >> a[i];
  long long l = 0, r = n;
  while (l <= r) {
    long long mid = l + r >> 1;
    long long ma = 0, Q = 0;
    for (int i = 1; i <= n; i++) b[i] = 1ll * i * mid + a[i];
    sort(b + 1, b + 1 + n);
    for (int i = 1; i <= mid; i++) Q += b[i];
    if (Q <= m)
      ans = mid, l = mid + 1;
    else
      r = mid - 1;
  }
  cout << ans << ' ';
  long long Q = 0;
  for (int i = 1; i <= n; i++) a[i] = ans * i + a[i];
  sort(a + 1, a + 1 + n);
  for (int i = 1; i <= ans; i++) Q += a[i];
  cout << Q << endl;
  return 0;
}
