#include <bits/stdc++.h>
using namespace std;
int n;
long long int s;
int a[100011];
int k;
long long int dp[100011];
long long int totcost = 0;
long long int cost[100011];
int main() {
  cin >> n >> s;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  long long int k = n;
  long long int left = 0;
  long long int right = n;
  long long int mid = (left + right) >> 1;
  long long int ans_cost2 = 0;
  while (right - left > 1) {
    totcost = 0;
    for (int i = 1; i <= n; i++) {
      cost[i] = a[i] + i * mid;
    }
    sort(cost + 1, cost + n + 1);
    for (int i = 1; i <= mid; i++) {
      totcost += cost[i];
    }
    if (totcost <= s) {
      left = mid;
      ans_cost2 = totcost;
    } else {
      right = mid - 1;
    }
    mid = left + ((right - left) >> 1);
  }
  long long int ans_cost = 0;
  for (long long int i = 1; i <= n; i++) {
    cost[i] = a[i] + i * (left + 1);
  }
  sort(cost + 1, cost + n + 1);
  for (int i = 1; i <= left + 1; i++) ans_cost += cost[i];
  if (ans_cost > s)
    cout << left << " " << ans_cost2 << "\n";
  else
    cout << left + 1 << " " << ans_cost << "\n";
  return 0;
}
