#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T bigmod(T p, T e, T M) {
  if (e == 0) return 1;
  if (e % 2 == 0) {
    T t = bigmod(p, e / 2, M);
    return (t * t) % M;
  }
  return (bigmod(p, e - 1, M) * p) % M;
}
template <class T>
inline T gcd(T a, T b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
template <class T>
inline T modinverse(T a, T M) {
  return bigmod(a, M - 2, M);
}
template <class T>
inline T multimod(T a, T b, T m) {
  T ans = 0ll;
  a %= m, b %= m;
  while (b) {
    if (b & 1ll) ans = m - ans > a ? (ans + a) : (ans + a - m);
    b >>= 1ll;
    a = (m - a) > a ? a + a : a + a - m;
  }
  return (T)ans;
}
void sc(int &a) { scanf("%d", &a); }
void sc(long long &a) { scanf("%lld", &a); }
void sc(double &a) { scanf("%lf", &a); }
void sc(int &a, int &b) { scanf("%d %d", &a, &b); }
void sc(long long &a, long long &b) { scanf("%lld %lld", &a, &b); }
void sc(int &a, int &b, int &c) { scanf("%d %d %d", &a, &b, &c); }
void sc(int &a, int &b, long long &c) { scanf("%d %d %lld", &a, &b, &c); }
void sc(long long &a, long long &b, long long &c) {
  scanf("%lld %lld %lld", &a, &b, &c);
}
void sc(string &str) { cin >> str; }
void sc(char *(str)) { scanf(" %s", str); }
void sc(char &c) { scanf(" %c", &c); }
long long arr[(100000 + 7)];
long long take[(100000 + 7)];
int main() {
  int i, j;
  int t, cases = 1;
  int q, u, v;
  int n, m;
  long long s;
  sc(n);
  sc(s);
  for (i = 0; i < n; i++) {
    sc(arr[i]);
  }
  long long st = 0, ed = n, mid, ans = 0, b = 0;
  while (st <= ed) {
    mid = (st + ed) / 2;
    for (i = 0; i < n; i++) take[i] = arr[i] + (i + 1ll) * mid;
    sort(take, take + n);
    long long sum = 0ll;
    for (i = 0; i < n && (sum + take[i]) <= s; i++) {
      sum += take[i];
    }
    if (i >= mid) {
      ans = mid;
      st = mid + 1;
      b = sum;
    } else
      ed = mid - 1;
  }
  for (i = 0; i < n; i++) take[i] = arr[i] + (i + 1ll) * ans;
  sort(take, take + n);
  b = 0ll;
  for (i = 0; i < ans; i++) b += take[i];
  cout << ans << " " << b << endl;
  return 0;
}
