#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  long long int s;
  cin >> s;
  long long int a[n], b[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  if (n == 1) {
    if (a[0] + 1 <= s)
      cout << "1 " << a[0] + 1 << endl;
    else
      cout << "0 0" << endl;
  } else {
    long long int temp[n], size, l1, l2, k, i, h1, h2, sum = 0, j, lo = 0, mid,
                                                       hi = n;
    while (lo != hi) {
      mid = lo + (hi - lo) / 2;
      for (int r = 0; r < n; r++) b[r] = a[r];
      for (j = 0; j < n; j++) b[j] += (mid * (j + 1));
      for (size = 1; size < n; size = size * 2) {
        l1 = 0;
        k = 0;
        while (l1 + size < n) {
          h1 = l1 + size - 1;
          l2 = h1 + 1;
          h2 = l2 + size - 1;
          if (h2 >= n) h2 = n - 1;
          i = l1;
          j = l2;
          while (i <= h1 && j <= h2) {
            if (b[i] <= b[j])
              temp[k++] = b[i++];
            else
              temp[k++] = b[j++];
          }
          while (i <= h1) temp[k++] = b[i++];
          while (j <= h2) temp[k++] = b[j++];
          l1 = h2 + 1;
        }
        for (i = l1; k < n; i++) temp[k++] = b[i];
        for (i = 0; i < n; i++) b[i] = temp[i];
      }
      sum = 0;
      for (i = 0; i < mid; i++) sum += b[i];
      if (sum > s)
        hi = mid - 1;
      else
        lo = mid;
      if (hi - lo == 1) {
        for (i = 0; i < n; i++) b[i] = a[i];
        for (j = 0; j < n; j++) b[j] += (hi * (j + 1));
        for (size = 1; size < n; size = size * 2) {
          l1 = 0;
          k = 0;
          while (l1 + size < n) {
            h1 = l1 + size - 1;
            l2 = h1 + 1;
            h2 = l2 + size - 1;
            if (h2 >= n) h2 = n - 1;
            i = l1;
            j = l2;
            while (i <= h1 && j <= h2) {
              if (b[i] <= b[j])
                temp[k++] = b[i++];
              else
                temp[k++] = b[j++];
            }
            while (i <= h1) temp[k++] = b[i++];
            while (j <= h2) temp[k++] = b[j++];
            l1 = h2 + 1;
          }
          for (i = l1; k < n; i++) temp[k++] = b[i];
          for (i = 0; i < n; i++) b[i] = temp[i];
        }
        sum = 0;
        for (i = 0; i < hi; i++) sum += b[i];
        if (sum > s) hi = lo;
        break;
      }
    }
    for (i = 0; i < n; i++) b[i] = a[i];
    for (j = 0; j < n; j++) b[j] += (hi * (j + 1));
    for (size = 1; size < n; size = size * 2) {
      l1 = 0;
      k = 0;
      while (l1 + size < n) {
        h1 = l1 + size - 1;
        l2 = h1 + 1;
        h2 = l2 + size - 1;
        if (h2 >= n) h2 = n - 1;
        i = l1;
        j = l2;
        while (i <= h1 && j <= h2) {
          if (b[i] <= b[j])
            temp[k++] = b[i++];
          else
            temp[k++] = b[j++];
        }
        while (i <= h1) temp[k++] = b[i++];
        while (j <= h2) temp[k++] = b[j++];
        l1 = h2 + 1;
      }
      for (i = l1; k < n; i++) temp[k++] = b[i];
      for (i = 0; i < n; i++) b[i] = temp[i];
    }
    sum = 0;
    for (i = 0; i < hi; i++) sum += b[i];
    cout << hi << " " << sum << endl;
  }
}
