#include <bits/stdc++.h>
using namespace std;
void read_input() {}
void solving() {
  long long int n, s;
  cin >> n >> s;
  long long int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  long long int low = 0, high = n;
  long long int cost = (int)(1e18);
  long long int ans = 0;
  while (low <= high) {
    long long int mid = (low + high) >> 1;
    priority_queue<long long int, vector<long long int>,
                   greater<long long int> >
        pq;
    for (int i = 0; i < n; i++) {
      long long int kitne = i + 1;
      pq.push((kitne * mid) + a[i]);
    }
    long long int sum = 0;
    long long int cnt = 0;
    while (!pq.empty() && cnt < mid) {
      long long int el = pq.top();
      pq.pop();
      sum += el;
      if (sum > s) break;
      cnt++;
    }
    if (cnt == mid && sum <= s) {
      low = mid + 1;
      cost = sum;
      ans = mid;
    } else
      high = mid - 1;
  }
  if (ans == 0)
    cout << "0 0";
  else
    cout << ans << " " << cost;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  read_input();
  int t = 1;
  for (int i = 1; i <= t; i++) {
    solving();
  }
  return 0;
}
