#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  long long int s;
  cin >> n >> s;
  int a[n + 1];
  long long int b[n + 1];
  for (int i = 1; i <= n; i++) cin >> a[i];
  long long int low = 0, high = n + 1, mid = (low + high) >> 1;
  long long int cost = 0;
  while (high > low + 1) {
    cost = 0;
    for (int i = 1; i <= n; i++) b[i] = a[i] + i * mid;
    sort(b + 1, b + n + 1);
    for (int i = 1; i <= mid; i++) cost += b[i];
    if (cost > s)
      high = mid;
    else
      low = mid;
    mid = (low + high) >> 1;
  }
  for (int i = 1; i <= n; i++) b[i] = a[i] + mid * i;
  long long int ans = 0;
  sort(b + 1, b + n + 1);
  for (int i = 1; i <= mid; i++) ans += b[i];
  cout << mid << " " << ans << endl;
  return 0;
}
