#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio;
  cin.tie(NULL);
  long long int n, s, Cost;
  cin >> n >> s;
  long long int arr[n];
  for (long long int i = 0; i < n; i++) cin >> arr[i];
  long long int arr2[n];
  long long int c1 = 0;
  for (long long int i = 0; i < n; i++) arr2[i] = arr[i] + (i + 1) * n;
  sort(arr2, arr2 + n);
  for (long long int i = 0; i < n; i++) c1 += arr2[i];
  if (c1 <= s) {
    cout << n << " " << c1;
    return 0;
  }
  long long int l = 0, r = n, k;
  while (l < r) {
    k = (l + r) / 2;
    long long int L = l, R = r;
    long long int cost = 0;
    for (long long int i = 0; i < n; i++) arr2[i] = arr[i] + (i + 1) * k;
    sort(arr2, arr2 + n);
    for (long long int i = 0; i < k; i++) cost += arr2[i];
    if (cost > s) {
      r = k;
    } else {
      l = k;
    }
    if (L == l && R == r) break;
  }
  long long int cost1 = 0;
  cout << k << " ";
  for (long long int i = 0; i < n; i++) arr2[i] = arr[i] + (i + 1) * k;
  sort(arr2, arr2 + n);
  for (long long int i = 0; i < k; i++) cost1 += arr2[i];
  cout << cost1;
  return 0;
}
