#include <bits/stdc++.h>
using namespace std;
template <typename T1, typename T2>
bool umin(T1& x, T2 y) {
  return (x > y ? (x = y, true) : false);
}
template <typename T1, typename T2>
bool umax(T1& x, T2 y) {
  return (x < y ? (x = y, true) : false);
}
template <typename T>
void read(T& x) {
  char ch;
  T p = 1;
  x = 0;
  do {
    ch = getchar();
  } while (ch <= ' ');
  if (ch == '-') p = -1, ch = getchar();
  while (ch >= '0' && ch <= '9') x = x * 10 + ch - '0', ch = getchar();
  x *= p;
}
void read(string& x) {
  char ch;
  do {
    ch = getchar();
  } while (ch <= ' ');
  while (ch > ' ') x += ch, ch = getchar();
}
void read(char& x) {
  do {
    x = getchar();
  } while (x <= ' ');
}
template <typename T, typename... R>
void read(T& x, R&... y) {
  read(x);
  read(y...);
}
const int N = (int)1e6 + 3;
const long long mod = (long long)1e9 + 7;
const int INF = (int)1e9 + 1;
const long long LLINF = (long long)1e18 + 1;
const long double pi = (long double)acos(-1.0);
const long double eps = (long double)1e-11;
int n, m;
long long a[N];
long long calc(long long x) {
  vector<long long> nw(n);
  for (int i = (0); i < (n); i++) nw[i] = a[i] + x * (i + 1ll);
  sort((nw).begin(), (nw).end());
  long long ret = 0;
  for (int i = (0); i < (x); i++) ret += nw[i];
  return ret;
}
bool can(long long x) { return (m >= calc(x)); }
int main() {
  read(n, m);
  for (int i = (0); i < (n); i++) read(a[i]);
  int l = 0, r = n;
  while (l + 1 < r) {
    int mid = (l + r) / 2;
    if (can(mid))
      l = mid;
    else
      r = mid;
  }
  if (can(r))
    printf("%d %I64d\n", r, calc(r));
  else
    printf("%d %I64d\n", max(0, l), calc(l));
  return 0;
}
