#include <bits/stdc++.h>
using namespace std;
const int N = 1e3 + 5, M = 17 + 5, MOD = 998244353, OO = 0x3f3f3f3f;
const long double ESP = 1e-8;
int n;
long long s;
vector<int> arr;
pair<bool, long long> ok(long long k) {
  priority_queue<long long, vector<long long>, greater<long long>> q;
  for (int i = 0; i < n; i++) q.push(arr[i] + ((i + 1) * k));
  long long cost = 0;
  while (k--) {
    cost += q.top();
    q.pop();
  }
  if (cost <= s) return {1, cost};
  return {0, 0};
}
pair<int, long long> binarySearch() {
  int lo = 0, md, hi = n;
  int cost = 0;
  while (hi - lo > 0) {
    md = (lo + hi + 1) / 2;
    pair<bool, long long> isOk = ok(md);
    if (isOk.first) {
      lo = md;
      cost = isOk.second;
    } else
      hi = md - 1;
  }
  return {hi, cost};
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> s;
  arr = vector<int>(n);
  for (int &x : arr) cin >> x;
  pair<int, long long> ans = binarySearch();
  cout << ans.first << ' ' << ans.second << '\n';
}
