#include <bits/stdc++.h>
using namespace std;
long long int MOD = 1000000007;
long long int N;
vector<long long int> els;
long long int power(long long int x, long long int y, long long int p) {
  long long int res = 1;
  x = x % p;
  if (x == 0) return 0;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
long long int best(long long int k) {
  vector<long long int> temp;
  for (long long int i = 0; i < N; i++) {
    temp.push_back(els[i] + (i + 1) * k);
  }
  sort(temp.begin(), temp.end());
  long long int ans = 0;
  for (long long int i = 0; i < k; i++) {
    ans += temp[i];
  }
  return ans;
}
long long int binarySearch(long long int x) {
  long long int l = 1;
  long long int r = N;
  while (l <= r) {
    long long int m = l + (r - l) / 2;
    if (best(m) == x || (best(m) < x && (m == N || best(m + 1) > x))) return m;
    if (best(m) < x)
      l = m + 1;
    else
      r = m - 1;
  }
  return 0;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  long long int t;
  t = 1;
  while (t--) {
    long long int n, s, el, sum = 0, cost = 0;
    cin >> n >> s;
    N = n;
    for (long long int i = 0; i < n; i++) {
      cin >> el;
      els.push_back(el);
    }
    long long int ans = binarySearch(s);
    cout << ans << ' ' << best(ans);
  }
}
