#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long n, s;
  cin >> n >> s;
  long long a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  long long l = 0, r = n, total = 0;
  while (l < r) {
    long long mid = (l + r) / 2;
    long long cost[n];
    for (int i = 0; i < n; i++) {
      cost[i] = a[i] + mid * (i + 1);
    }
    sort(cost, cost + n);
    total = 0;
    for (int i = 0; i < mid; i++) {
      total += cost[i];
    }
    if (s < total) {
      r = mid;
    } else {
      l = mid;
    }
    if (r - l == 1) {
      int cost[n];
      mid = r;
      for (int i = 0; i < n; i++) {
        cost[i] = a[i] + mid * (i + 1);
      }
      sort(cost, cost + n);
      total = 0;
      for (int i = 0; i < mid; i++) {
        total += cost[i];
      }
      if (s >= total) {
        l = r;
      } else {
        mid = l;
        for (int i = 0; i < n; i++) {
          cost[i] = a[i] + mid * (i + 1);
        }
        sort(cost, cost + n);
        total = 0;
        for (int i = 0; i < mid; i++) {
          total += cost[i];
        }
      }
      break;
    }
  }
  cout << l << " " << total << "\n";
  return 0;
}
